when we look at file information using Ls-l, we see that each file has a time parameter, so what does this time mean? It's actually three change times.
modification Time (mtime) :
This time is changed when the "content data" of the file is changed.
status Time (CTime) :
This time is updated when the status of the file changes.
< Strong style= "Color:rgb (0,0,136); font-family: ' New fine Ming body ', serif;font-size:14.6667px;white-space:normal; Background-color:rgb (255,255,255); " >access time (atime) :
When the contents of this file are read, the read time (access) is updated.
By default, Ls-l sees that the file is displayed in Mtime, which is the time the content data is changed.
So can we change the time of the file, how to change it, so let's say touch this command.
Touch
Function: Modify file time or create new file
Use format:
Touch [-ACDMT] ... File...
Parameter description:
-A: Modify access time only
-C: Only the time to modify the file, if the file does not exist, do not create a new file
-D: You can follow the date you want to revise instead of the current date, or you can use the--date= "date or time"
-M: Modify Mtime only
-T: The time after which the revision can be received instead of the current time, in the format [YYMMDDHHMM]
Example:
Example 1. Create a new file and observe the time, in the default state, if the touch is followed by a file, the file's three time (Atime/ctime/mtime) will be updated to the current time, otherwise create a new file.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7A/3E/wKiom1al6jCQ5rzgAAAM59I6hX4190.png "title=" Qq20160125172554.png "alt=" Wkiom1al6jcq5rzgaaam59i6hx4190.png "/>
Example 2. Copy a file, copy the full attribute, check its time
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7A/3E/wKiom1al65bjsJlZAAAnIFHqaHw576.png "title=" Qq20160125173151.png "alt=" Wkiom1al65bjsjlzaaanifhqahw576.png "/>
This article is from the "11117200" blog, please be sure to keep this source http://11127200.blog.51cto.com/11117200/1738367
The touch of Linux common commands