The time of creating the Linux system file is not unchangeable. The touch command can modify the time of the file to achieve the effect of false. Here's a look at how the Linux system can modify the file.
described with respect to the touch command:
-d, --date = STRING
parse STRING and use it instead of current time
Touch parameter description:
Command parameters:
-a or --time=atime or --time=access or --time=use Only change the access time.
-c or --no-create does not create any documents.
-d Use the specified date and time instead of the current time.
-f This parameter will be ignored and will only be used to resolve compatibility issues with the BSD version of the touch directive.
-m or --time=mtime or --time=modify only changes the change time.
-r Sets the date and time of the specified document or directory to the same date and time as the reference document or directory.
-t Use the specified date and time instead of the current time.
--no-create will not create a new file.
--help Lists the instruction format.
--version Lists version messages.
Here you can use a simple modification of the file time.
Example: Modify some files in the system to three months ago:
The current system file information is as follows:
[root@case test]# ls - l
total 28
drwxr-xr-x 2 root root 4096 Jan 9 15:47 1333
-rwxrwxr-x 1 oracle oinstall 8143 Jan 9 14:41 3 .sh
drwxr-xr-x 2 root root 4096 Jan 9 15:49 444
-rw-r--r-- 1 root root 0 Jan 9 14:41 4.sh
-rwxr-xr-x 1 root root 8143 Jan 9 14:44 77.sh
-rwxrwxr-x 1 root root 54 Jan 9 16:03 find.sh
Change all .sh files to the time three months ago (October 13, 2015). Operation command:
[root@case test]# touch -d “10/13/2013” *.sh
The result is:
[root@case test ]# ls -l
total 28
drwxr-xr-x 2 root root 4096 Jan 9 15:47 1333
-rwxrwxr-x 1 oracle oinstall 8143 Oct 13 00:00 3.sh
drwxr-xr-x 2 root root 4096 Jan 9 15:49 444
-rw-r--r-- 1 root root 0 Oct 13 00: 00 4.sh
-rwxr-xr-x 1 root root 8143 Oct 13 00:00 77.sh
-rwxrwxr-x 1 root root 54 Oct 13 00:00 find.sh
Alternatively, you can modify the time or month separately, as follows
to use am, pm or 24 hour format, the date can use other formats such as 6 May 2000.
touch -d “6:03pm” file
touch -d “05/06/2000” file
touch -d “6:03pm 05/06/2000” file
The above is the way the Linux system can modify the file time, so that the user can view it or the file recognition time can be changed to a few months ago. .
Sublime Text is a code editor that supports Linux and other operating systems. In L
Screen is a window manager that can multiplex a physical terminal between multiple
Linux swap partitions similar to Windows virtual memory, in the case of insufficient hard disk space
Node.js provides a rich JavaScript library for various Linux modules, which simplifies the use of No
How to add Swap to Ubuntu boot entry?
What should I do if the Linux crontab has a BAD FILE MODE error?
Ubuntu how to set up system update reminder
How to use Ubuntu command management authority
Linux tips for viewing directory content
How to solve the problem that Linux does not limit the Limit value after opening SSH
The process of reading MBR information from Linux system
Ubuntu system terminal removal program method
How Linux cracks root password in single-user mode
What should I do if libpng fails to compile after Gentoo upgrade?
Win7 printer does not print the solution after the print command is sent automatically disappears
Win7 c disk can clean up the directory file list
WinXP does not have permission to view the processing method of the workgroup computer
Take you to know ten special files in XP system
What should I do if there is a green screen failure when playing video in win7?
Vista shipped models modified XP, the prompt does not recognize the hard drive solution
Windows7 encountered the problem of unable to install the font how to solve
Are there any hackers who are particularly familiar with using computers?
Win7 system often pops up "Windows detected a hard disk problem" prompt window failure
AutoCAD 2008 Simplified Chinese version installation and activation tutorial