Wednesday, September 3, 2014

Copy File and Folder Older then 7days

Copy File and Folder Older then 7days


find /in/this/directory/ -mtime -7 -exec cp -p {} /to/new/path/ \;

Note:

-7 = Last 7 days
cp -p = Copy and keep the owner,permission and timestamp

No comments:

Post a Comment