Create/Compress/Archive , Extract/Uncompress/Unarchive Almost Any File in Linux (tar, tar.gz, tar.bz2, gz, bz, zip, 7z, rar, etc…)

Suffixe Create/Compress/Archive Extract/Uncompress/Unarchive    
.tar tar cvf filename.tar /dir tar xvf filename.tar    
.tar.gz tar czvf filename.tar.gz /dir tar xzvf filename.tar.gz    
.tgz tar cvzf filename.tgz /dir tar xvzf filename.tgz    
.tar.gz2 You probably mean .tar.bz2 You probably mean .tar.bz2    
.tar.bz tar cjvf filename.tar.bz /dir tar xjvf filename.tar.bz    
.tbz tar cjvf filename.tbz /dir tar xjvf filename.tbz    
.tar.bz2 tar cjvf filename.tar.bz2 /dir tar xjvf filename.tar.bz2    
.tar.Z .Z is an old naming convention which has moved to .gz. See .tar.gz above. zcat file.tar.Z tar xvf -  
.tar.xz tar cvf - filenames lzma > filename.tar.xz lzcat filename.tar.xz tar xvf -
.gz gzip filename gunzip filename.gz    
.gz2 You probably mean .bz2 You probably mean .bz2    
.bz bzip filename bunzip filename.bz    
.bz2 bzip2 filename bunzip2 filename.bz2    
.xz lzma filename unlzma filename.xz    
.zip zip -r filename.zip /dir unzip filename.zip    
.7z 7z a -t7z filename.7z /dir 7z x filename.7z    
.rar rar a filename.rar /dir unrar x filename.rar