[Wolves] Quick question

Aquarius wolves at mailman.lug.org.uk
Wed Aug 13 11:57:01 2003

Re-LoaD's LUG Mail spoo'd forth:
> All,
>    Can I tar up just the directory structure with out the content of the
> directories. ??
> I have a system at work with lots of  directories with sym links  from other
> users home directories (don't ask) the data files are backed up on another
> system the copies on this box are just the working copies. But if the system
> was to fail it would be a real pain the to recreate the directory structure.
> ?

I can't find a way of doing it in one command. The way I would do it is
like this.

Imagine that you want to tar up everything in directory 'foo'. So,
first, you make a list of all the files in directory foo:

$ find foo -type f > tar.exclude

Then tar up the directory, telling it to exclude every file listed in

$ tar --create --verbose --exclude-from tar.exclude foo/

Then delete tar.exclude.

$ rm tar.exclude

And that should be it. I think.


"We saved the world, and now there's no place in it for us."