Delete But Don't Copy

Ryan Kather RDKath at Roushind.com
Thu Sep 29 13:29:28 GMT 2005


Is it possible to use RSYNC to only delete files that exist at the destination, but not the source.  I would like RSYNC to remove files that exist at the destination but do not exist at the source WITHOUT copying or creating any additional files.  

If RYSNC can't do this, does someone know a nice way?  Perhaps, find <regex> > listing.txt && find <destinationregex> > destination.txt && diff listing.txt destination.txt | rm the differences?  (seems kind of ugly to me though). 



More information about the rsync mailing list