[ale] tar question

Gary Maltzen maltzen at mm.com
Fri Jul 21 18:22:01 EDT 2000


Unless you have "esthetic" reasons for NOT wanting tarred files to have a
prefixed directory name,

1# tar cvzf /tmp/tarball.tar.gz -C /some/dirname .
2# cd /some/dirname ; tar cvzf /tmp/tarball.tar.gz .

 -- results in tar with "./" prefix on all filenames

1# tar cvzf /tmp/tarball.tar.gz -C /some dirname
2# cd /some ; tar cvzf /tmp/tarball.tar.gz dirname

 -- results in tar with "dirname/" prefix on all filenames

> I'm experimenting with tar, which I should know much better than
> I do.  :-)
>
> What's the best way to include ".filenames" without including
> "..", which will include the everything in the parent directory?
>
> So far I've been going with:
>
> tar cvfz tarball.tar.gz dirname/.* --exclude '..'
>
> I want to include subdirectories and their dotfiles.  Is there a
> better way to do it?


--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list