Issue
How do I "copy" the modification date and time from one file/dir to another in Unix-based systems?
id='dv4'>
Solution
You have some options:
- Use
touch -t STAMP -m file
if you want to change the time - Use
cp --preserve=timestamps
if you're copying the files and want to preserve the time - Use
touch -r
to set the time to a "reference" file
Answered By - cnicutar Answer Checked By - David Marino (WPSolving Volunteer)