rsync --delete-existing needed

Matt McCutchen hashproduct+rsync at gmail.com
Sun May 6 13:14:53 GMT 2007


On 5/5/07, Matthias Schniedermeyer <ms at citd.de> wrote:
> If you have subdirectories to be killed:
> find . -type d -empty -exec rmdir {}\;
> You have to run that a few times (One time for each deepth-level), and don't worry about the 'No such file or directory' warnings that it will spit for every deleted directory.
> Find just can't enter the directory it had deleted a nanosecond ago.

Using the -depth option makes find visit each directory after visiting
its contents, which solves both the warnings and the need to run find
multiple times.

Matt


More information about the rsync mailing list