Skip to content

zipinfo Linux command

The zipinfo command in Linux is used to display detailed information about the files contained within a ZIP archive. It provides a comprehensive list of files, their sizes, compression ratios, and modification times. This command is useful for quickly checking the contents of a ZIP file without having to extract it. Additionally, zipinfo can be used to verify the integrity of the archive by displaying any errors or inconsistencies found.

Terminal window
zipinfo [options] [zipfile]
OptionDescription
-1Show one line of information
-2Show two lines of information
-hShow a short help
-lDisplay file details
-TTest the zip file
-vDisplay more information
-zDisplay zip file comment
-ZDisplay a zipfile comment
ParameterDescription
zipfileSpecifies the zip file to view
Terminal window
zipinfo file.zip

This command displays detailed information about the contents of the “file.zip” archive.

Terminal window
zipinfo -1 archive.zip

List all files contained in the “archive.zip” without additional details.

Terminal window
zipinfo -z document.zip

View any comment attached to the “document.zip” archive.

Terminal window
zipinfo -v report.zip

Display detailed information about the compression methods used in the “report.zip” archive.

Terminal window
zipinfo -l data.zip

List file permissions and other details for files within the “data.zip” archive.

Terminal window
zipinfo -m backup.zip

Extract and display metadata information for the contents within the “backup.zip” archive.

To use the zipinfo command in Linux, execute the following command:

Terminal window
zipinfo -1 example.zip

What is the purpose of the zipinfo command?

Section titled “What is the purpose of the zipinfo command?”

The zipinfo command in Linux is used to display information about files in a ZIP archive.

Terminal window
zipinfo example.zip

How can I view the contents of a ZIP archive using zipinfo?

Section titled “How can I view the contents of a ZIP archive using zipinfo?”

You can view the contents of a ZIP archive by using the zipinfo command with the archive file as the argument.

Terminal window
zipinfo -l example.zip

How do I list the files in a ZIP archive without details with zipinfo in Linux?

Section titled “How do I list the files in a ZIP archive without details with zipinfo in Linux?”

To list the files in a ZIP archive without details, use the following command:

Terminal window
zipinfo -1 example.zip

How can I extract specific files from a ZIP archive using zipinfo?

Section titled “How can I extract specific files from a ZIP archive using zipinfo?”

You can extract specific files from a ZIP archive with the help of zipinfo by first noting the file paths and then using the unzip command.

Terminal window
zipinfo example.zip | grep "desired_file.txt" | xargs unzip example.zip

Is it possible to display detailed information about a specific file in a ZIP archive using zipinfo?

Section titled “Is it possible to display detailed information about a specific file in a ZIP archive using zipinfo?”

Yes, you can display detailed information about a specific file in a ZIP archive by providing the filename as an argument to the zipinfo command.

Terminal window
zipinfo -l example.zip specific_file.txt

How do I list metadata of files and directories in a ZIP archive with zipinfo?

Section titled “How do I list metadata of files and directories in a ZIP archive with zipinfo?”

To list metadata of files and directories in a ZIP archive, use the following command:

Terminal window
zipinfo -m example.zip

Can zipinfo display file comments in a ZIP archive?

Section titled “Can zipinfo display file comments in a ZIP archive?”

Yes, zipinfo can display file comments in a ZIP archive. You can view file comments along with file details.

Terminal window
zipinfo -z example.zip
  • Viewing the contents of a zip archive
  • Extracting metadata from a zip archive
  • Checking the integrity of a zip file
  • Listing the files and directories inside a zip archive