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 [email protected]:/home/dir . --exclude [email protected]:/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?
excludefolder must be relative to thesourcedirectory and not the absolute path. – SKPS Jul 27 '16 at 10:01rsync -av [email protected]:/home/dir . --exclude subdir– SKPS Jul 27 '16 at 10:11