I have 1 directory with 9 subdirectories and 10 files. Subdirectory have next level subdirectories and files.
/home/directory/
/home/directory/subdirectory1
/home/directory/subdirectory2
...
/home/directory/subdirectory9
/home/directory/file1
...
/home/directory/file10
I want to copy all subdirectories and files recursivly excluding:
/home/directory/subdirectory5
/home/directory/subdirectory7
What is the best way for it?
rsync -avz --exclude subdirectory5 --exclude subdirectory7 /home/directory/ target-path