Home / tar basics

Unpack an archive:
tar xvf archive.tgz

Create an archive:
tar zcvf archive.tgz archive-dir

Unpack in a given directory:
tar -C dir -zxvf name.tgz

Note: dir must already exist

Options:

-v     : verbose
-x     : extract
-c     : create
-f     : file name
-C dir : where to uncompress

Options can be mushed (i.e. -xvf is same as -x -v -f)