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

copy a file - keep the timestamp

Status
Not open for further replies.

buxtonicer1

Programmer
Sep 20, 2006
82
GB
Is there a way to cp files from one folder to another but keeping the same time associated with the file, i.e. the time the files were created.
 
man cpio
man tar
man touch

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Use the -p option to cp to preserve all details.

Alan Bennett said:
I don't mind people who aren't what they seem. I just wish they'd make their mind up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top