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

12.04.2006
| 32624 views |
  • submit to reddit
        
tar -zcvf packagename.tar.gz folder/
    

Comments

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

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

Michael Richter replied on Sun, 2006/10/22 - 4: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.