List the contents of a tar or tar.gz file

Task: List the contents of a tar file</p>

Use the following command:
$ tar -tvf file.tar
Task: List the contents of a tar.gz file

Use the following command:
$ tar -ztvf file.tar.gz
Task: List the contents of a tar.bz2 file

Use the following command:
$ tar -jtvf file.tar.bz2</div> </div>

comments powered by Disqus