touch (update access and modification date)

Sets the access and modification dates for a file to the current date and time. If the file doesn't exist, touch creates an empty file, setting the dates.

Format:    touch filelist
Examples:  touch report
OptWhat It DoesExamples
-aUpdate only the access datetouch -a file1.txt
-cDon't create a filetouch -c file3
-mUpdate only the modification datetouch -m file4
-r filenameChange date to match filenametouch -r file2 report3

Get Spring Into Linux® 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.