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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Modification Date?

Status
Not open for further replies.

Funkymatt

Programmer
Aug 27, 2002
101
US
All,

I am planning on using a command to remove files that are older than 7 days from a test folder. When I copied them over obviously the mod date changed. Is it possible to

A) Change the mod date to greater than 7 days? or
B) Move the files over again (from another server) without manpulating the date modified?

Thanks,
Matt
 
This should do what you want:

touch `date +%m`152002 YOUR_FILE_NAME_HERE
This should reset the file date/time to Dec 15, (TIME: 20:02).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top