touch

Updates a file's modification time

touch [options] file-list

The touch utility updates the time a file was last accessed and the time it was last modified and also allows you to specify these times on the command line. This utility is frequently used with make.

Arguments

The file-list contains the pathnames of the files touch is to update.

Options

When you do not specify the -c option, touch creates files that do not already exist. If touch is used without the -d or -t options, touch uses the current date and time.

--date datestring

-d datestring Updates times with the date specified by datestring. Most familiar formats are permitted for datestring. Components of the date and time not included in datestring are assumed to be the current ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.