Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to change date on a file

Status
Not open for further replies.

lorel

MIS
Jun 15, 2004
158
Due to an error we have changed the creation date on a file to today's date. Is there a way to change the file date back to a previous date?
Thanks
Joe
 
The only (but dangerous) way I see is to change the system date (man asktime) before recreating the file and then restore the system date.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How is this different from using the "touch" command? Does this only adjust the "last modification" date?

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
The touch command deals with last access and last modification times only.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
The touch command using the -am and -t options did what I needed. I was aware of the touch command but I did not know that it could also change the date of the file to a previuos time
Thanks every one who took the time to answer my question.
Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top