linux poison RSS
linux poison Email

HowTo chang the 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 `nikesh’ to the current date and time, type:

$ touch nikesh

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 `nikesh’ to `17 May 2006 14:16′, type:

$ touch -d ‘17 May 2006 14:16′ nikesh

* To change the timestamp of file `nikesh’ to `14 May’, type:

$ touch -d ‘14 May’ nikesh

* To change the timestamp of file `nikesh’ to `14:16′, type:

$ touch -d ‘14:16′ nikesh


0 comments:

Post a Comment

Related Posts with Thumbnails