l (list) command displays the contents of an archive with detailed information about files, compression ratios, and archive properties.
Syntax
Description
The list command provides information about:- Files and directories in the archive
- File sizes (uncompressed and compressed)
- Compression ratios
- File attributes and timestamps
- Archive metadata and properties
- Encryption status
Common Options
Name of the archive to list. 7-Zip auto-detects the archive type.
Specific files or patterns to list. If omitted, lists all files.Example:
*.txt or documents/Provide password for encrypted archives.Example:
-pMyPassword or -p (prompts)Show technical information for each file (detailed mode).
Set archive type (usually auto-detected).Example:
-t7zExclude files from listing by pattern.Example:
-x!*.tmpInclude only files matching pattern.Example:
-i!*.txtRecurse subdirectories (enabled by default).
Include archives by pattern.
Exclude archives by pattern.
Examples
Basic listing
List with technical details
List specific files
List files in directory
List encrypted archive
List excluding certain files
List only specific file types
List multiple archives
Understanding the Output
Standard Listing Columns
| Column | Description |
|---|---|
| Date | Last modification date |
| Time | Last modification time |
| Attr | File attributes (D=Directory, R=Read-only, H=Hidden, S=System, A=Archive) |
| Size | Uncompressed file size |
| Compressed | Compressed size in archive |
| Name | File or directory name |
File Attributes
- D - Directory
- R - Read-only
- H - Hidden
- S - System
- A - Archive
- . - Attribute not set
Archive Properties
- Type - Archive format (7z, ZIP, RAR, etc.)
- Physical Size - Actual archive file size
- Headers Size - Size of archive metadata
- Method - Compression method used
- Solid - Whether archive is solid
- Blocks - Number of solid blocks
Technical Listing (-slt)
The-slt switch provides detailed information for each file:
Full path of the file within archive
Whether entry is a folder (+) or file (-)
Uncompressed size in bytes
Compressed size in bytes
Last modification timestamp
File system attributes
CRC32 checksum (hexadecimal)
Whether file is encrypted (+) or not (-)
Compression method and dictionary size
Solid block number
Advanced Examples
List with grep filtering
Count files in archive
List only directories
Calculate total uncompressed size
List sorted by size (with parse)
Working with Different Archive Types
List ZIP archive
List TAR archive
List TAR.GZ archive
List RAR archive
List ISO image
List multi-volume archive
List self-extracting archive
Scripting with List Command
Check if file exists in archive
Extract archive metadata
List to file
Parse technical listing
The list command does not extract any files. It only reads the archive’s central directory/headers, making it very fast even for large archives.
Related Commands
- Extract Command (x, e) - Extract files from archive
- Test Command (t) - Test archive integrity
- Add Command (a) - Create archives