The touch Command in linux is not commonly used. it is generally used when you use make. The most common usage is touchfileA. if fileA exists, you can 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: change the file or directory time. Syntax: touch [-acfm] [-d & lt;
Linux touch commands are not commonly used and may be used when you use make.
The most common usage is 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: change the file or directory time. Syntax: touch [-acfm] [-d
<日期时间>
] [-R
<参考文件或目录>
] [-T
<日期时间>
] [-- 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
<时间日期>
Use 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
<参考文件或目录>
Set the date and time of the specified file or directory to the same date as that of the reference file or directory. -T
<日期时间>
Use the specified date and time instead of the current time. -- Help online help. -- Version: displays the version information.
The touch Command in linux is not commonly used. it may be used when you use make to modify the file timestamp or create a new file that does not exist. [-Acm] [-r Ref_file (reference file) |-t Time (time value)] File (file name) example: touch file1.txt update file1.txt access and modification time touch-c file1.txt if file1.txt does not exist, if you do not create a file touch-r ref_file file1.txt, the time stamp of file1.txt is the same as that of ref + file. touch-t 0811142234.50 file1.txt. The file time is incorrect. it is, January 1, November 14.
- Modify file File The access time. -C Do not create files File. -M Modify file File modification time -R Ref_file Reference File Ref_file The corresponding time stamp value is used as the specified file File The new value of the time stamp. -T Time Use the specified time value Time As a specified file File The new value of the corresponding time stamp. Time Decimal format as follows