Welcome to the Info TEST server!

Skip to content. | Skip to navigation

Info Services > Computing Guide > File Access & Archiving > 7Zip > Quick Guide for Linux & Mac

Quick Guide for Linux & Mac

File Archiving, File Management, Compression, Decompression, Extraction, Tar, Zip,

See also: File Archiving and Compression, 7-Zip Command-line Guide, Accessing and Sharing Files, Network Access, Windows Terminal Servers

A port of 7-Zip, named P7-Zip, is available for Linux and Mac machines and runs from the command line only.  Other than the invocation command, "7z", all commands, parameters and switches are identical for all command-line versions of 7-Zip.

To begin a P7Zip session, open a command line window, then enter "7z" to invoke the P7-Zip (7z.exe) application before entering the command with the parameters and switches. See the 7-Zip Command-line Guide for detailed descriptions.

Command Line Syntax

The general command line syntax is:

"archive_format"   "command"   "switches"   "archive_name"   "file_names"

Eg;   7z a  -p{Pa$$word7Zip_Archive test_file.txt creates a 7z formatted archive named 7Zip_Archive that is protected with a password  ("Pa$$word") , then adds a file named test_file.txt to the archive.

See the 7-Zip Command Line Guide for a detailed description of syntax conventions.

Command Quick Reference

Command Description
a Add
b Benchmark
d Delete
e Extract
l List
t Test
u Update
x eXtract with full paths

Switch Quick Reference

Switch Description
-- Stop switches parsing
-ai Include archive filenames
-an Disable parsing of archive_name
-ao Overwrite mode
-ax Exclude archive filenames
-i Include filenames
-m Set Compression Method
-o Set Output directory
-p Set Password
-r Recurse subdirectories
-scs Set charset for list files
-seml Send archive by email
-slp Set Large Pages mode
-slt Show technical information
-sfx Create SFX archive
-si Read data from StdIn
-so Write data to StdOut
-ssc Set Sensitive Case mode
-ssw Compress files open for writing
-t Type of archive
-u Update options
-v Create Volumes
-w Set Working directory
-x Exclude filenames
-y Assume Yes on all queries