Friday, December 19, 2008

Read contents of a tar file

List the contents of a tar file
$ tar -tvf file.tar
List the contents of a tar.gz file
$ tar -ztvf file.tar.gz
List the contents of a tar.bz2 file
$ tar -jtvf file.tar.bz2
Where,
t: List the contents of an archive v: Verbosely list files processed (display detailed information) z: Filter the archive through gzip so that we can open compressed (decompress) .gz tar file j: Filter archive through bzip2, use to decompress .bz2 files. f filename: Use archive file called filename

No comments: