Quantcast
Viewing latest article 1
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 latest article 1
Browse Latest Browse All 2

Trending Articles