before referring to the Find command , the-newer , -anewer, and -cnewer parameters can be used to find files in a time period. But often we do not have two of the exact time node files that we want to use, which requires the use of the Touch command to create the specified atime , mtime file.
( 1 -t Span style= "text-indent:37px;font-family: ' The song Body '; > parameters: Specify the file atime and mtime 1970 year Span style= "TEXT-INDENT:37PX;" >1 month 1 Span style= "text-indent:37px;font-family: ' The song Body '; The number of milliseconds from the day to the specified date, or you can use the date directly in the format [[CC]YY]MMDDHHMM[.SS]
[Email protected] ~]# touch-t 201003141036.30 oldfile
Note that the time here can also be quoted with quotes, i.e.:
[Email protected] ~]# touch-t "201003141036.30" Oldfile
(2)-D parameter: the same as the-T parameter, specify the file atime and mtime, just use the format slightly different, use a string form to specify the time:
[[email protected] ~]# touch-d "20020306"
[[email protected] ~]# touch-d "20020304 12:38"
(3)-r parameter: use atime and mtime of other files as Atime and mtime for This file :
[Email protected] ~]# touch-r oldfile newfile
(4)-a parameter: Only modify the Atime , the time setting does not affect the mtime , combined with -D or -T or -R use:
[Email protected] ~]# touch-a-t 201003141036.30 oldfile
[Email protected] ~]# touch-r oldfile newfile-a
(5)-M parameter: Only modify the Mtime, the time setting does not affect the Atime , with the-D or -t or -R use:
[Email protected] ~]# touch-m-t 201003141036.30 oldfile
[Email protected] ~]# touch-r oldfile newfile-m
Note:touch does not have relevant parameters to specify the file CTime, that is, the ctime of the newly created file can only be the current time.
This article is from the "barrel of fake dog excrement" blog, please be sure to keep this source http://xitongjiagoushi.blog.51cto.com/9975742/1632840
Learn a little more (ix)--Use the touch command to create a file of a specified time