I have a directory structure with a variable number of subdirectories and files. I would like to exclude everything EXCEPT 1 subdirectory tree.
I have tried
rsync -a --include 'wanted_dir' --exclude '*' 1/ 2/
but it gives me just the wanted_dir
directory (none of the files under it).
To include all files within your directory, add the triple stars :
rsync -a --include 'wanted_dir/***' --exclude '*' 1/ 2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With