--delete for old file only?

S P Arif Sahari Wibowo arifsaha at yahoo.com
Sun Feb 16 04:17:32 EST 2003


Do you know any trick (scripts, combining rsync with other tools, etc.) to
let rsync only delete the files with modification time before (older than)
a certain date-time (can use the time of a file as a reference time)?

It probably more difficult when we rsync out (for rsync in, the we can
actually find out right away which files in that criteria using small
Find::File perl script).

The idea is for a pair of sites that rsync each other (and use the
--delete option). The old file only delete mechanism will reduce the
possibily of a new file just added accidentally removed by the next rsync
with --delete.

Maybe something to add to rsync itself? :-)

I use rsync-2.4.4 in RH linux 7.0


                                   S P Arif Sahari Wibowo
  _____  _____  _____  _____ 
 /____  /____/ /____/ /____          arifsaha at yahoo.com
_____/ /      /    / _____/       http://www.arifsaha.com/

More information about the rsync mailing list