I'm trying to copy the contents of a series of directories non-recursively to another remote system.
/dirA/dir1/file
/dirA/dir2/file
/dirA/dir3/file
dir1, dir2, and dir3 contain many directories that I do not want copied. Copy on the remote host to /dirB maintaining the same directory structure.
I tried:
rsync /dirA/*/ host:/dirB/
rsync /dirA/ host:/dirB/
But they don't do what I want.
-f '- /*/'to restrict to top level files only. I also had to specify-f '- .*'to exclude dot files, since I was syncing a home directory. – haridsv Sep 11 '14 at 09:27