Changing File Modification Time

Use touch to change a file's timestamp without modifying its contents. Give the name of the file to be changed as an argument. The default action is to change the timestamp to the current time.

To change the timestamp of file `pizzicato' to the current date and time, type:

$ touch pizzicato RET

To specify a timestamp other than the current system time, use the `−d' option, followed by the date and time that should be used enclosed in quote characters. You can specify just the date, just the time, or both.To change the timestamp of file `pizzicato' to `17 May 1999 14:16', type:

$ touch −d '17 May 1999 14:16' pizzicato RET

To change the timestamp of file `pizzicato' to `14 May', type:
$ touch −d '14 May' pizzicato RET

To change the timestamp of file `pizzicato' to `14:16', type:

$ touch −d '14:16' pizzicato RET

NOTE: When only the date is given, the time is set to `0:00'; when no year is given, the current year is

Posted on: 16/12/2009








0 Comments
If you want to leave a comment please Login or Register
How to backup your data using rsync......
Understanding autoconf......
The Basics of fdisk......
Accessing Memory Using DMA......
The fd Directory......