1TOUCH(1) User Commands TOUCH(1)
2
3
4
6 touch - change file timestamps
7
9 touch [OPTION]... FILE...
10
12 Update the access and modification times of each FILE to the current
13 time.
14
15 A FILE argument that does not exist is created empty, unless -c or -h
16 is supplied.
17
18 A FILE argument string of - is handled specially and causes touch to
19 change the times of the file associated with standard output.
20
21 Mandatory arguments to long options are mandatory for short options
22 too.
23
24 -a change only the access time
25
26 -c, --no-create
27 do not create any files
28
29 -d, --date=STRING
30 parse STRING and use it instead of current time
31
32 -f (ignored)
33
34 -h, --no-dereference
35 affect each symbolic link instead of any referenced file (useful
36 only on systems that can change the timestamps of a symlink)
37
38 -m change only the modification time
39
40 -r, --reference=FILE
41 use this file's times instead of current time
42
43 -t STAMP
44 use [[CC]YY]MMDDhhmm[.ss] instead of current time
45
46 --time=WORD
47 change the specified time: WORD is access, atime, or use: equiv‐
48 alent to -a WORD is modify or mtime: equivalent to -m
49
50 --help display this help and exit
51
52 --version
53 output version information and exit
54
55 Note that the -d and -t options accept different time-date formats.
56
58 The --date=STRING is a mostly free format human readable date string
59 such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or
60 even "next Thursday". A date string may contain items indicating cal‐
61 endar date, time of day, time zone, day of week, relative time, rela‐
62 tive date, and numbers. An empty string indicates the beginning of the
63 day. The date string format is more complex than is easily documented
64 here but is fully described in the info documentation.
65
67 Written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie,
68 and Randy Smith.
69
71 Report touch bugs to bug-coreutils@gnu.org
72 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
73 General help using GNU software: <http://www.gnu.org/gethelp/>
74 Report touch translation bugs to <http://translationproject.org/team/>
75
77 Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU
78 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
79 This is free software: you are free to change and redistribute it.
80 There is NO WARRANTY, to the extent permitted by law.
81
83 The full documentation for touch is maintained as a Texinfo manual. If
84 the info and touch programs are properly installed at your site, the
85 command
86
87 info coreutils 'touch invocation'
88
89 should give you access to the complete manual.
90
91
92
93GNU coreutils 8.4 June 2018 TOUCH(1)