Skip to content

Make a compressed tarball, and extract the same

by moflint on October 19th, 2011

Create a bzip’ed tarball
tar -cjvf test.tbz home

-c tells tar to create an archive. j tells it to bzip the file. v makes it display the names of of the files as it processes them. z is to compress the file and f tells tar to use the next name in the command (test.tbz in the example). The final argument is the directory to be processed.

Likewise create a gzip’ed tarball
tar -czvf test.tar.gz home

The z flag tells it to use gzip compression.

Extracting is simple too:
tar -xzvf test.tar.gz (gzip) or tar -xjvf test.tbz (bzip)

From → Linux

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS