Code: Select all
$ rsync -a -f"+ */" -f"- *" source/ destination/
Code: Select all
$ rsync -a --include='*/' --exclude='*' source/ destination/
I've used symlinks for gathering multiple partitions together in the source-dir I wanted to copy the directories from with rsync.
The solution is to add a "-k" to the rsync command:
So the correct command for this case looks like this:-k, --copy-dirlinks transform symlink to dir into referent dir
Code: Select all
$ rsync -ak --include='*/' --exclude='*' source/ destination/