Thanks to this great little script you no longer need to work out which program to use to uncompress multiple file archive formats.
Add this script to your .bashrc file and use as follows:
extract file.zip

 
extract () {
if [ -f $1 ] ; then
case $1 in
*.<span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span>.bz2)   <span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span> xvjf $1    ;;
*.<span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span>.gz)    <span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span> xvzf $1    ;;
*.<span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span>.xz)    <span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span> xvJf $1    ;;
*.bz2)       bunzip2 $1     ;;
*.rar)       unrar x $1     ;;
*.gz)        gunzip $1      ;;
*.<span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span>)       <span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span> xvf $1     ;;
*.tbz2)      <span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span> xvjf $1    ;;
*.tgz)       <span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">tar</span> xvzf $1    ;;
*.<span class="highlight" style="border: 1px solid gray; background: yellow none repeat scroll 0% 0%;">zip</span>)       unzip $1       ;;
*.Z)         uncompress $1  ;;
*.7z)        7z x $1        ;;
*.xz)        unxz $1        ;;
*.exe)       cabextract $1  ;;
*)           echo "\`$1': unrecognized file compression" ;;
esac
else
echo "\`$1' is not a valid file"
fi