Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by Nasir Riley for rsync delete folders from destination if does not exists in source

You can use:

rsync -avhH --delete /src/dir /dest/dir/

That will delete any files in the destination directory on that don't exist in the source directory.

As for the rest of the switches a uses archive mode, v makes it verbose so that you can see what's happening during the process, h makes any numbers human-readable, and H preserves hard links.


Viewing all articles
Browse latest Browse all 2

Trending Articles