Worked like a charm! Thanks Rob ----- Original Message ----- From: "John Kodis" <kodis@xxxxxxxxxxxxxxxxxxxxx> To: "For users of Fedora Core releases" <fedora-list@xxxxxxxxxx> Sent: Tuesday, April 13, 2004 12:58 PM Subject: Re: OT: tar only directory structure > On Tue, Apr 13, 2004 at 11:57:07AM -0500, Rob Freeman wrote: > > > Is it possible to just tar only the directory structure of a mount? We are > > looking into backing up the /home of a fedora box, but do not need the > > thousand of files in all the separate folders. Just the directory structure > > and permissions. > > Use the "find" command to list all the directories, bash's "pipe a > command into a file descriptor" feature to feed this list of files to > tar, and tar's "--no-recursion" flag to tell tar not to back up the > files in the directories. Putting all this together, to back up the > contents of the current working directory, you could use a command > something like this: > > $ tar cf dirs.tar --no-recursion --files-from <( find . -type d ) > > -- > John Kodis Goddard Space Flight Center > kodis@xxxxxxxxxxxxxxxxxxxxx Greenbelt, Maryland, USA > Phone: 301-286-7376 Fax: 301-286-1771 > > > -- > fedora-list mailing list > fedora-list@xxxxxxxxxx > To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list