UnixServerAdmin

Server Administration & Management

How to change the access time for a file

Here is complete steps to change access time of particular file

# touch -a myfile

It would change the accesstime of myfile to whatever is the current time

How to set access time to a particular time

# touch -a 0526102311 myfile

Read it as two digits each for month, day, hour, minute and year.

05 –> Month
26 –> Day
10 –> Hour
23 –> Minute
11 –> Year

Advertisements

April 26, 2011 Posted by | Tips & Tricks, Unix/Linux | , , | 2 Comments