Most common usage: Touch filea
If filea exists, use the touch command to change the date and time of the file or directory, including the access time and change time;
If filea does not exist, the touch command creates a blank file filea in the current directory.
Touch command details
Function Description: changes the file or directory time.
Syntax: touch [-ACFM] [-D <date and time>] [-r <reference file or directory>] [-T <date and time>] [-- help] [-- version] [file or directory...] or touch [-ACFM] [-- help] [-- version] [Date and time] [file or directory...]
Note: You can use the touch command to change the date and time of a file or directory, including the access time and change time.
Parameters:
-A or -- time = atime or -- time = access or -- time = use only change the access time.
-C or -- no-create does not create any files.
-D <time and date> uses the specified date and time instead of the current time.
-F this parameter will not be processed. It is only responsible for solving the compatibility problem of the BSD touch command.
-M or -- time = mtime or -- time = Modify only changes the change time.
-R <reference file or directory> sets the date and time of the specified file or directory to the same date as that of the reference file or directory.
-T <date and time> uses the specified date and time instead of the current time.
-- Help Online Help.
-- Version: displays the version information.