TOUCH(1) | General Commands Manual | TOUCH(1) |
touch
— change
file access and modification times
touch |
[-acfhm ] [-d
isotime | -t
datetime | -r
ref_file] file... |
touch
changes the date modification and
access times on each file it is given.
-a
-m
is also given.-c
-f
-d
isotime@1698791420
’
corresponds to 2023-10-31 23:30:20 UTC
Or as
‘YYYY-MM-DDThh:mm:SS[frac][tz]
’,
where:
YYYY-MM-DD
’T
’T
’ or a space.[frac]
’[tz]
’[+-]HH:?MM
’ or the letter
"Z", signifying UTC.Some examples:
2003-06-02T13:37:42.713Z
’1971-01-02T03:04:05.678+0900
’-c
-h
-m
-a
is also given.-t
datetimeCC
’YY
’MMDDhhmm
’.SS
’For example:
‘200306021337.42
’
-r
ref_fileThe touch
utility exits 0 on
success, and >0 if an error occurs. Note: Will exit with failure
when -c
is given but the file doesn't exists.
touch
should be compliant with the IEEE
Std 1003.1-2024 (“POSIX.1”) specification.
-h
and -f
are
extensions.
Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
2023-06-03 | Linux 6.6.67-gentoo-x86_64 |