7z command
From NetworkCommands
A command line program available on Linux platforms; used to test the integrity of and display and extract the contents of existing 7-Zip archives.
Contents |
Usage Syntax
7z [options] archive-name.7z
Common options include;
- e - extract files from archive without preserving path (i.e. in current directory)
- x - extract files from archive preserving path
- l - list files in archive
- t - test integrity of archive
Usage Examples
7z e /etc/test.7z - extract files from archive /etc/test.7z to the current working directory
7z x test.7z - extract files from archive test.7z to the path specified in the archive
Linux Usage Notes
With most Linux or Unix commands;
- Brief help can be displayed using the option/keyword: -h or --help, for example: chmod --help
- A full command manual can be displayed using the man command followed by the command name, for example: man chmod
- Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
- Version information can be display using the option/keyword: -v or --version, for example: chmod --version
Installation
7Zip can be installed or upgraded as follows, depending on your platform;
- Ubuntu: apt-get install p7zip or apt-get install p7zip-full
- Fedora Core: yum install p7zip
- FreeBSD: pkg_add -v -r p7zip
Related Files
The 7z executable is normally found here: /usr/bin/7z
Related Commands
See the unrar command, tar command, zip command and unzip command articles for information on other file compression utilities available under Linux.
Related Articles
Information on other Linux commands
Information on Cisco commands
Information on Vyatta commands
Information on Extreme commands
Information on F5 BigIP commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands







