Make a compressed tarball, and extract the same
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)
