I am trying to backup files from cluster to my local computer. On the process, I am trying to avoid some unnecessary sub-directories from cluster being copied.
So I use rsync -av user@cluster.com:/home/dir . --exclude user@cluster.com:/home/dir/subdir
, where subdir
is the folder I am trying to avoid. However, the above option copies all files and folders including subdir
. How to exclude subdir
?
exclude
folder must be relative to thesource
directory and not the absolute path. – SKPS Jul 27 '16 at 10:01rsync -av user@cluster.com:/home/dir . --exclude subdir
– SKPS Jul 27 '16 at 10:11