Skip to main content

Command Palette

Search for a command to run...

List the contents of backup.tar.gz without extracting it. (Use tar -tzf command)

Published
1 min read

List the Contents of backup.tar.gz Without Extracting

Use the following command:

bashCopyEdittar -tzf backup.tar.gz

Explanation of Options:

  • tList the contents of the archive

  • zHandle gzip (.gz compressed file)

  • fSpecify the archive file

Expected Output Example:

bashCopyEditbackup_dir/
backup_dir/file1.txt
backup_dir/file2.txt

This confirms that backup.tar.gz contains backup_dir and its files.

More from this blog

cloud_comuting&_Networking

65 posts