Cheatsheet: Unzip

Basic Extraction Commands

Extract a zip archive

unzip archive_name.zip

Extract a zip archive to a specific directory

unzip archive_name.zip -d /path/to/destination

Overwrite files without prompting

unzip -o archive_name.zip

Skip overwriting files that already exist

unzip -n archive_name.zip

Listing Archive Contents

List the contents of a zip archive

unzip -l archive_name.zip

View detailed contents of a zip archive

unzip -Z archive_name.zip

Testing & Verifying Archives

Test the integrity of a zip archive

unzip -t archive_name.zip

Display verbose test output

unzip -tt archive_name.zip

Advanced Options

Extract specific files from an archive

unzip archive_name.zip file1 file2

Exclude specific files during extraction

unzip archive_name.zip -x file_to_exclude

Extract files interactively (prompt before overwrite)

unzip -i archive_name.zip

Extract a password-protected zip archive

unzip archive_name.zip

See also: