copy dirs. subdirs, symlink, but not files

aurfalien at aurfalien at
Sun May 16 22:01:08 MDT 2010

Hi all,

I've been messing around with needing to duplicate a dir tree minus  
its file contents.

What i would like to achieve is to rsync dirs, subdirs and sym links  
of dirs excluding files.

My first experiment was to simply do dirs and subdirs;

rsync -a -f"+ */" -f"- *" source destination

Worked like a champ.

However I'm unsure how to include or exclude sym links from this so i  

rsync -a -f"+ */" -f"- * -l" source destination

Which breaks everything and copies all data, dirs, subdirs, sym links  
and files.

Any ideas?

More information about the rsync mailing list