Useful Tips for GNU/Linux Operating System

Creation of Tar and Compressed file (Tar-ball) in one go

May 7, 2008 · 1 Comment

Suppose you want to create tar ball of directory xyz in your home directory.

$ cd ~

$ tar -zcvf xyz.tar.gz xyz/

or

$ tar -jcvf xyz.tar.bz2 xyz/

If you want to untar an unzip at one go, go to
the desired output directory.

$ cd ~

$ tar -zxvf xyz.tar.gz

or

$ tar -jxvf xyz.tar.bz2

Categories: bzip · gzip · linux · tar · tarball

1 response so far ↓

Leave a Comment