Re: [SLE] Duplicating a directory structure
- From: Jerry Feldman <gaf@xxxxxxx>
- Date: Thu, 27 Jul 2006 16:34:14 -0400
On Thursday 27 July 2006 2:51 pm, Marlier, Ian wrote:
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?
Try this. I had forgotten about cpio. This works including copying
directories with embedded spaces.
find . -type d | cpio -pdum TARGET_DIRECTORY
--
Jerry Feldman <gaf@xxxxxxx>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the archives at
http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@xxxxxxxx
Relevant Pages
- Re: Tar command and permissions.
... can I preserve permission of sub directory. ... I've never seen the p flag used before, so did man tar and saw this ... Yep I tried without the p flag and same result. ... overwrites the subdir permissions with the user that extracted it, ... (comp.unix.solaris) - Re: Extracting individual Files via tar
... you must use the f flag when manipulation files. ... > tar: Error exit delayed from previous errors ... > file specification I am attempting to recover from the archive throws ... > Martin McCormick WB5AGZ Stillwater, ... (freebsd-questions) - Re: Ideas for a module to process command line arguments
... looking at the default value (if the default value is a boolean then the option is a flag); however I removed that functionality because I wanted to be able to differentiate between flag and options. ... If your'e referring to using a single hyphen and a list of characters to represent a long option (which, to the rest of the world, use two leading hyphens) then that's pretty weird. ... Consider most of the GNU tools: ... tar -xzvf file.tgz ... (comp.lang.python) - Re: How to move debian from one drive to another and keep it working?
... > use it if you use the f flag, which requires a filename. ... Thanks for the clarification. ... I seem to remember using 'tar' without the '-' character in the past, but I noticed the Debian man pages were using the hypen, and thought it might be causing my problems. ... (Debian-User) - Re: creating multi volume tar files .tar1, .tar2 etc
... tar would do something intelligently. ... > Can someone tell me a way that i can tar up (tar, zip, compress i dont ... Hi Ian, ... The -O option to tar says to send the archive to the standard output. ... (RedHat) |
|