File: touch.1

package info (click to toggle)
coreutils 9.10-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 70,560 kB
  • sloc: ansic: 253,546; sh: 30,931; perl: 8,141; yacc: 1,846; makefile: 198; python: 47; sed: 16
file content (86 lines) | stat: -rw-r--r-- 3,970 bytes parent folder | download
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
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.50.1.
.TH TOUCH "1" "February 2026" "GNU coreutils 9.10" "User Commands"
.SH NAME
touch \- create file, or change file timestamps
.SH SYNOPSIS
.B touch
[\fI\,OPTION\/\fR]... \fI\,FILE\/\fR...
.SH DESCRIPTION
.\" Add any additional description here
.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 AUTHOR
Written by Paul Rubin, Arnold Robbins, Jim Kingdon,
David MacKenzie, and Randy Smith.
.SH "REPORTING BUGS"
Report bugs to: bug\-coreutils@gnu.org
.br
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
.br
General help using GNU software: <https://www.gnu.org/gethelp/>
.br
Report any translation bugs to <https://translationproject.org/team/>
.SH COPYRIGHT
Copyright \(co 2026 Free Software Foundation, Inc.
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"
Full documentation <https://www.gnu.org/software/coreutils/touch>
.br
or available locally via: info \(aq(coreutils) touch invocation\(aq