Monday, August 13, 2007

how to untar/tar

To get the files out of a tarball, you can use the following commands:

tar xvf something.tar

If the tarball has also been gzipped (compressed), you can use the following command:

tar xvfz something.tar.gz



The biggest thing that I always forget when trying to use this command is that it doesn't accept the "-" prefix before its modifiers like most other linux commands.

If you need to create a tar file
http://infohost.nmt.edu/tcc/help/unix/tar_build.html
tar -cvzf name.tgz subdir
the 'z' is optional and gzips the file.
the 'v' is optional and gives a verbose output.

No comments: