aboutsummaryrefslogtreecommitdiff
path: root/man/touch.1
blob: 95314cd7ea2cb54635472a741f0e7248eac7952f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
.\" Adapted for BNU from the GNU Coreutils 9.11 manual page; see doc/README.md.
.TH TOUCH "1" "2026-07-28" "BNU 9.11" "BNU Commands"
.SH NAME
touch \- create file, or change file timestamps
.SH SYNOPSIS
.B touch
[\fI\,OPTION\/\fR]... \fI\,FILE\/\fR...
.SH DESCRIPTION
.\" This page is derived from GNU Coreutils documentation.
This page documents BNU, an independent Bun implementation compatible with
GNU Coreutils 9.11.
.PP
Update the access and modification times of each FILE to the current time.
.PP
A FILE argument that does not exist is created empty, unless \fB\-c\fR or \fB\-h\fR
is supplied.
.PP
A FILE argument string of \- is handled specially and causes touch to
change the times of the file associated with standard output.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch-a'\fB\-a\fP\X'tty: link'
change only the access time
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch-c'\fB\-c, \-\-no\-create\fP\X'tty: link'
do not create any files
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch-d'\fB\-d, \-\-date=\,STRING\fP\X'tty: link'\/\fR
parse STRING and use it instead of current time
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch-f'\fB\-f\fP\X'tty: link'
(ignored)
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch-h'\fB\-h, \-\-no\-dereference\fP\X'tty: link'
affect each symbolic link instead of any referenced file;
useful only on systems that can change the timestamps of a symlink
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch-m'\fB\-m\fP\X'tty: link'
change only the modification time
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch-r'\fB\-r, \-\-reference=\,FILE\fP\X'tty: link'\/\fR
use this file's times instead of current time
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch-t'\fB\-t [[CC]YY]MMDDhhmm[.ss]\fP\X'tty: link'
use specified time instead of current time,
with a date\-time format that differs from \fB\-d\fR's
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#touch--time'\fB\-\-time=WORD\fP\X'tty: link'
specify which time to change:
access time (\fB\-a\fR): 'access', 'atime', 'use';
modification time (\fB\-m\fR): 'modify', 'mtime'
.TP
\X'tty: link https://www.gnu.org/software/coreutils/touch#touch--help'\fB\-\-help\fP\X'tty: link'
display this help and exit
.TP
\X'tty: link https://www.gnu.org/software/coreutils/touch#touch--version'\fB\-\-version\fP\X'tty: link'
output version information and exit
.SH "DATE STRING"
.\" NOTE: keep this paragraph in sync with the one in date.x
The --date=STRING is a mostly free format human readable date string
such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or
even "next Thursday".  A date string may contain items indicating
calendar date, time of day, time zone, day of week, relative time,
relative date, and numbers.  An empty string indicates the beginning
of the day.  The date string format is more complex than is easily
documented here but is fully described in the info documentation.
.SH AUTHORS
Upstream GNU Coreutils documentation authors:
Written by Paul Rubin, Arnold Robbins, Jim Kingdon,
David MacKenzie, and Randy Smith.
.br
Adapted for BNU; the BNU implementation is independent.
.SH "REPORTING BUGS"
Report BNU bugs at <https://github.com/Soccera1/bnu/issues>.
.br
For upstream GNU Coreutils, see <https://www.gnu.org/software/coreutils/>.
.SH COPYRIGHT
Copyright \(co 2026 Free Software Foundation, Inc.
.br
This manual page was adapted for BNU in 2026.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
Upstream documentation <https://www.gnu.org/software/coreutils/touch>
.br
BNU documentation is available locally via: info \(aq(bnu) touch invocation\(aq