[CentOS] rsync - dirs and symlinks only, not contents

Mon May 17 01:06:29 UTC 2010
aurfalien at gmail.com <aurfalien at gmail.com>

Hi all,

I have a need to copy only dirs, subdirs and sym links only without  
the need to copy contents.

I originally used the following test to observe behavior;

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

So I noticed that dirs/subdirs were copied but without contents as  
desired.

I have several sym links (dir sym links) that I would also to to copy  
over.

I tried this;

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

Although my sym links show, they are broken.

Any thoughts on how to copy dirs, subdirs and sym links only w/o  
contents?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20100516/1f782111/attachment-0004.html>