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

Richard has posted 22 posts at DZone. View Full User Profile

UNIX Tar Commands

05.03.2006
| 37546 views |
  • submit to reddit
        // how the heck do you do the stuff you do with zip but with tar

create tar file
tar cvf filename.tar monkey.txt monkey2.txt

add a file
tar uvf filename.tar monkey.txt

extract tar file
tar xvf filename.tar

list contents
tar tf monkey.tar

    

Comments

Akhil Reddy replied on Thu, 2012/08/09 - 7:40am

There are many other options available in unix tar command.

You can compress a file using the gzip using the z option which savs the disk space.