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
tar -cvzf name.tgz subdir
the 'z' is optional and gzips the file.
the 'v' is optional and gives a verbose output.

No comments:

Post a Comment

Please leave your thoughts, I love hearing what you got out of the post. Spam comments will be removed.