i have a task to rsync all files and folders which is older than 3 days in capacity 2TB.

Here is the way i did.

# touch -mt 09201200 /tmp/compare
[[email protected] media.live]# ll /tmp/ |grep compare
-rw-r--r--   1 root     root        0 Sep 20 12:00 compare

the run the find command:

find /.../product -type f -newer ./tmp/compare -exec stat {} \; |egrep "File|Modify"

it should list all the files which is modified from 09201200 date up to present.

then you will have file list. just need to run rsync to do the last step.

Comments are closed.