DZone 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

Snippets has posted 5883 posts at DZone. View Full User Profile

Unix, Pack Folder And Contents With Tar Gz

  • submit to reddit
tar -zcvf packagename.tar.gz folder/


Snippets Manager replied on Tue, 2006/05/30 - 5:14pm

thank you for your comment! i'm always willing to learn. :)

Michael Richter replied on Sun, 2006/10/22 - 3:41am

To use bzip2 instead of gzip, substitute a 'j' for the 'z'. Bzip2 is typically superior for text files than gzip while the reverse tends to be true for binary. It is, however, very slow during compression.