Sometimes, we need to use the stat command in Linux to see the details of the file. Also at Lenovo, ls -l command displays what time, touch command to modify file time stamps, modify what is time? Here we take a test under.
stat - Get more information than ls
First, we look at the stat case
There will be three types of time, namely, Access, Modify, Change. Here we have these three time next be explained in detail.
access time: to express our last visit (just visit, no change) of time to file
modify time: to express our last modified file time
change time: indicates the last time we change the time of the file attributes, including permissions, size, attributes, and so on.
For example, we use the cat command to view this file:
At this time, access time of the file modified. access time we can understand the last time for us to access the file.
Let us look at the case of change of time:
At this time, when we modify the properties of the file, etc., change with the change of time, modify time but is constant, because we do not modify the content of the document.
Here we look at the situation and then modify the time:
At this point we can see that the three time points have changed.
Thus, we can know
1, when we merely read the file, access time changes, and modify, change time will not change
2, when the revised document, access, modify, change time will change accordingly
3, when modifying the file attributes, change time change, and access, modify time constant.
So, we use the command ls -l displays what is time? touch-modified timestamp file modification time What time is it?
Then we continue to look.
Time ls -l displays
In this case, comparison can be found, time ls -l shows the file modification time.
Finally, touch modify what is time?
First, we look touch the man to help me find the answer.
Do not believe us try again. (But then, if no arguments, then, is all the time modifies out .man touch in there -a parameter, modify only the access time. We can try it yourself plus this parameter.)
We direct touch b.txt, because b.txt file already exists, but will not modify their new stamp.
At this point, I think we should thoroughly understand the time of the problems these orders. We can not understand the message on to the next.
Wrong place also please the god of guidance. Learn from each other.