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 GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
72 Report touch translation bugs to <https://translationproject.org/team/>
73
75 Copyright © 2018 Free Software Foundation, Inc. License GPLv3+: GNU
76 GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
77 This is free software: you are free to change and redistribute it.
78 There is NO WARRANTY, to the extent permitted by law.
79
81 Full documentation at: <https://www.gnu.org/software/coreutils/touch>
82 or available locally via: info '(coreutils) touch invocation'
83
84
85
86GNU coreutils 8.30 July 2018 TOUCH(1)