Extract the .tar.gz format to tar -zxvf xx.tar.gz
Extract the .tar.bz2 format to tar -jxvf xx.tar.bz2