Open ~/.bashrc file with your favorite editor and paste below script to the bottom of the file.
extract () { if [ -f1 in *.tar.bz2) tar xvjf
1 ;; *.bz2) bunzip2
1 ;; *.gz) gunzip
1 ;; *.tbz2) tar xvjf
1 ;; *.zip) unzip
1 ;; *.7z) 7z x
1'..." ;; esac else echo "'$1' is not a valid file!" fi }
then write “extract” on console with the file you want to extract and see the effect.
extract bla.tar.gz