Noah Roberts wrote:
> When running a command like this:
>
> tar zvcf `date +%G%m%d`-testinc.tar.gz --newer-mtime=datestampfile .
>
> It includes a bunch of empty directories in the archive. I can't find
> a switch to tell it to not include directories it won't be putting
> anything into. Is there such a thing or do I need to live with this or
> use find?
I find cpio to be better for this. Try something like:
find / -print | cpio -o | bzip2 --best > /tmp/$HOSTNAME-`date
+%m-%d-%y`.cpio.bz2
If you really want the best compression, you should first create the
archive, then compress it with bzip2 --best.
Hope that helps,
--
Sean
|