rsync only the directories, not the files

Matt McCutchen matt at
Thu Apr 24 17:16:52 GMT 2008

On Thu, 2008-04-24 at 18:00 +0100, Joao Ferreira gmail wrote:
> can I tell rsync to sync only the directory struture but _not_ the files
> inside the directories ?

Yes.  Pass the following option to exclude (-) everything but (!)
directories (/):

--filter='-! */'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url :

More information about the rsync mailing list