Mailinglist Archive: opensuse (2831 mails)

< Previous Next >
Re: [SLE] Duplicating a directory structure
  • From: Robert Morrison <orbert@xxxxxxxxxx>
  • Date: Thu, 27 Jul 2006 15:25:57 -0500
  • Message-id: <200607271525.57391.orbert@xxxxxxxxxx>
On Thursday 27 July 2006 13:51, Marlier, Ian wrote:

> > cd /tmp
> > mkdir /tmpdup
> > tar cf - . | (cd /tmpdup;tar xf -)
> Hrm...except that those are going to bring the files with them -- I just
> want an empty directory tree.
> Is there a flag for either tar or cp that tells it to only see/move
> directories, and not files?

rsync has the --dirs 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 was specified on the
command-line as either "." or a name with a trailing slash
(e.g. "foo/").

Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the archives at
Please read the FAQs: suse-linux-e-faq@xxxxxxxx

< Previous Next >