Low Orbit Flux Logo 2 D

Arch Linux - Install 7Zip

Installing and using 7Zip is easy on Arch Linux. We are going to show you everything that you need to know.

Install the p7zip package like this:


sudo pacman -S p7zip

Run the command like this. It will give you the usage which shows the available options.


7z

Add files to an archive. This will create it if it doesn’t exist.


7z a mycompressedfile.7z test1.txt

Add another file to an existing archive.


7z a mycompressedfile.7z test2.txt

Using the ‘a’ option to add a file that is alread in the archive will re-add the file even if there aren’t any changes.

Using the ‘u’ option will update the file in the archive only if it has changed. Otherwise it will do nothing.


7z u mycompressedfile.7z test2.txt

List all the files in an existing archive:


7z l mycompressedfile.7z

NOTE - Pay attention to where you extract things. You don’t want the entire contents of an archive being dumped into an existing directory that already has files in it. This can get messy.

Extract an archive:


7z e mycompressedfile.7z

Extract with full path:


7z x mycompressedfile.7z

Extract to a directory named “NEW”:


7z x -oNEW mycompressedfile.7z

Arch Linux - Install 7Zip - Video Demo

Here is a video showing how to install 7Zip on Arch Linux. It also shows how to complete some common operations like compressing and uncompressing files.