commands.sh

p7zip

all

Wrapper of 7-Zip file archiver with high compression ratio. Internally executes either 7za or 7zr command.

More info →

Options (3)

-k, --keepboolean

Archive a file keeping the input file

Example: p7zip {{[-k|--keep]}} {{path/to/file}}
-d, --decompressboolean

Decompress a file, replacing it with the original uncompressed version

Example: p7zip {{[-d|--decompress]}} {{compressed.ext}}.7z
-f, --forceboolean

Skip some checks and force compression or decompression

Example: p7zip {{[-f|--force]}} {{path/to/file}}

Examples (5)

Archive a file, replacing it with a 7zipped compressed version

p7zip path/to/file

Archive a file keeping the input file

p7zip [-k|--keep] path/to/file

Decompress a file, replacing it with the original uncompressed version

p7zip [-d|--decompress] compressed.ext.7z

Decompress a file keeping the input file

p7zip [-d|--decompress] [-k|--keep] compressed.ext.7z

Skip some checks and force compression or decompression

p7zip [-f|--force] path/to/file
made by @shridhargupta | data from tldr-pages