Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

tar and gzip on one line (See related posts)

Bundle my_dir
tar cvf - my_dir | gzip -c > my_dir.tar.gz

Unbundle my_dir
gunzip -c my_dir.tar.gz | tar xvf -

Comments on this post

alterego posts on Jan 24, 2007 at 19:06
What about:
tar xzvf my_dir.tar.gz my_dir
sergiovalenzuela posts on Jan 25, 2007 at 20:48
Doesn't work on HP-UX ... no z option to tar. Otherwise, that works!

You need to create an account or log in to post comments to this site.

Related Posts