List The Contents Of a tar.bz2 Tarball File

List The Contents Of a tar.bz2 Tarball File

To list the contents of a tar.bz2 tarball file on a Unix or Linux system, you can use the tar command with the -tvf options.

Here is the basic syntax for using the tar command to list the contents of a tar.bz2 file:

tar -tvf tarball.tar.bz2
Source‮tual.www:‬turi.com

The -t option tells the tar command to list the contents of the tarball. The -v option tells tar to display the names of the files in the tarball verbosely, including the file sizes and modification dates. The -f option tells tar to read the tarball from a file.

For example, to list the contents of a tar.bz2 file called myfiles.tar.bz2, you can use the following command:

tar -tvf myfiles.tar.bz2

This will display a list of the files and directories in the tar.bz2 file, along with their sizes and modification dates.

If you want to extract the contents of the tar.bz2 file instead of just listing them, you can use the -x option instead of the -t option.

For example:

tar -xvf myfiles.tar.bz2

This will extract the contents of the tar.bz2 file to the current directory.

Created Time:2017-10-30 10:17:49  Author:lautturi