[plug] Changing the time/date stamp on files & dirs ..

Bill Cullen billc at wantree.com.au
Sun Jul 18 21:53:15 WST 1999


Mark J Gaynor wrote:
> 
> Hi all,
> 
> This is one that I have not tried on a unix system. Can anyone give me
> some info on changing the time/date stamp on files and dirs.
> 
> It is a simple thing and I hope a simple solution. ( I hope it can be done)
> 

I'd use the touch command. ie:

touch -t 042713521976.55 testfile

will change the modification time on the file or directory
testfile to April 27, 1976, 1:52:55pm. The -t option uses the 
arguments MMDDhhmm[[CC]YY][.ss] (months, days, hours, minutes,
optional century and years, optional seconds). You have to be
either root or the owner of the file to make this change.

Consult the man page if you want further options such as changing
only access time.

Bill.
-- 
---------------------------------------------------------------------
  Bill Cullen, ENFP, billc at wantree.com.au, Perth, Western Australia
               Life's too important to take seriously.
=====================================================================


More information about the plug mailing list