This is quick tip, howto list contents of tar, tar.gz and tar.bz2 files without unpacking file.
This is very useful on server environment where any graphical tool is not available. This method is also very useful when tar, tar.gz or tar.bz2 packages are really big, something like hundreds of megabytes or gigabytes (for example backups).
Overall, the key is the tar command with -t option.
List the Contents of tar File
List tar contents short command
List tar contents long command
-t, –list – list the contents of an archive
-v, –verbose – verbosely list files processed
-f, –file=ARCHIVE – use archive file or device ARCHIVE