It is quite useful to view the contents of a zip, tar.gz or tar.bz2 file without extracting the file from the terminal.

View contents of a zip file

unzip -l archive.zip

View contents of a tar.gz file

tar -ztvf archive.tar.gz

View the contents of a tar.bz2 file

tar -jtvf archive.tar.bz2

View archive contents and search for a specific file therein:

tar -tvf archive.tar.bz2 '*someSearchString'