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

Thiago thiagossimas at gmail.com
Mon May 17 21:19:12 UTC 2010


You can try this option!!!
*-d, --dirs* Tell the sending side to include any directories that are
encountered. Unlike *--recursive*, a directory's contents are not copied
unless the directory name specified is "." or ends with a trailing slash
(e.g. ".", "dir/.", "dir/", etc.). Without this option or the
*--recursive*option, rsync will skip all directories it encounters
(and output a message
to that effect for each one). If you specify both *--dirs* and *--recursive*,
*--recursive* takes precedence.

The *--dirs* option is implied by the *--files-from* option or the *
--list-only* option (including an implied *--list-only* usage) if *
--recursive* wasn't specified (so that directories are seen in the listing).
Specify *--no-dirs* (or *--no-d*) if you want to turn this off.

There is also a backward-compatibility helper option, *--old-dirs* (or *
--old-d*) that tells rsync to use a hack of "-r --exclude='/*/*'" to get an
older rsync to list a single directory without recursing.


On Mon, May 17, 2010 at 12:01 PM, <aurfalien at gmail.com> wrote:

> On May 17, 2010, at 7:45 AM, John Doe wrote:
>
> > From: "aurfalien at gmail.com" <aurfalien at gmail.com>
> >> Any thoughts on how to copy dirs, subdirs and sym links only w/o
> >> contents?
> >
> > Not sure what you mean by broken but, did you check -k or -K?
> > Maybe if you give an example...
> >
> > JD
>
> Upon looking at them again, they are intact.
>
> However the contents or file data does get copied over when using the -
> l flag.
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20100517/dd5eaa5f/attachment.html>


More information about the CentOS mailing list