1. Time of linux file
The file time under linux mainly has the following three types:
1.1 modification time(mtime)
File modification time, that is, when the file content is modified, update this time, no Includes modifications to file permissions and attributes. Use ls -l to view, the default display time is mtime
$ ls -l uconv.h-rw-rw-r-- 1 work work 1808 Jul 23 2013 uconv.h1.2 status time(ctime)
The modification time of the file status status, such as when the file permissions and attributes are modified. Use ls --time=ctime to view$ ls -l --time=ctime uconv.h -rw-rw-r-- 1 work work 1808 Jul 23 2013 uconv.h1.3 access time(atime)
File access time, this time is updated when the file content is retrieved. Use ls --time=actime to view$ ls -l --time=atime uconv.h-rw-rw-r-- 1 work work 1808 Dec 12 2013 uconv.h2. Time to modify the file
If you need to modify the above three times, use the touch command to modify. Touch filename , if the file does not exist, create a new file.$ touch --helpUsage: touch [OPTION]... FILE...Update the access and modification times of each FILE to the current time. -a change only the access time modify access time -c, --no -create do not create any files Modify the file for three times. If it does not exist, do not create -d, --date=STRING parse STRING and use it instead of current time. Specify the time instead of the current time -f (ignored) -m change only the Modification time Modify mtime -r, --reference=FILE use this file's times instead of current time -t STAMP use [[CC]YY]MMDDhhmm[.ss] instead of current time Specify the modification time for example:$ touch - d "2 days ago" uconv.h$ ll uconv.h ; ll --time=atime uconv.h ; ll --time=ctime uconv.h ;-rw-rw-r-- 1 work work 1808 Jun 13 18:17 uconv.h-rw-rw-r-- 1 work work 1808 Jun 13 18:17 uconv .h-rw-rw-r-- 1 work work 1808 Jun 15 18:17 uconv.h Change mtime and atime to two days ago, ctime has not changed.$ touch -t 201406142020 uconv.h $ ll uconv.h ; ll --time=atime uconv.h ; ll --time=ctime uconv.h ;-rw-rw-r-- 1 work work 1808 Jun 14 20:20 uconv.h-rw-rw-r-- 1 work work 1808 Jun 14 20:20 uconv.h-rw-rw-r-- 1 work work 1808 Jun 15 18:23 uconv.hatime and mtime both Changed, but ctime became the current time. With the cp command, -a keeps the original attributes.$ cp -a uconv.h uconv.h1$ ll uconv.h1 ; ll --time=atime uconv.h1 ; ll --time=ctime uconv.h1 ;-rw-rw-r-- 1 work work 1808 Jun 14 20:20 uconv.h1-rw-rw-r-- 1 work work 1808 Jun 15 18:25 uconv.h1-rw-rw-r-- 1 work work 1808 Jun 15 18:27 uconv.h1mtime and Atime keeps the original file unchanged, but ctime becomes the current time address: http://blog.csdn.net/yonggang7/article/details/31008607
Many users who are new to Linux will use the concept of Windows to understand Linux system.
undergoing change How long ago was the last time you compiled the kernel? The answer for the new gen
Mount windows shared directory on Linux 1.Share windows folder Create a password-enabled user before
Ubuntus notebook came to a LAN, plugged in the Internet cable, the network cable indicator l
Linux process management related content
Linux system setting command alias
Method for obtaining path file name in Linux system
Debian Linux Network Configuration
Linux. How to install and uninstall the .run file
Linuxfind removes error messages
Linux user and user group settings
[linux study notes] swap virtual memory add and delete configuration
Small note IptabLes and IptabLex virus cleanup process
Have a dictionary of Win8 version experience follow the trend is not lax
Set Win8 dual-screen panorama theme
How to solve when Win8 app store can't open
How to close the system message reminder for Win10 preview?
Computer keyboard fingering practice
What if the application can't always be completely uninstalled?