unpack tar.gz to directory linux code example Example 1: linux extract tgz tar zxvf file.tgz Example 2: untar .tar file tar -xvf yourfile.tar