How to Unarchive Multiple .7z Files
Published on 30 May 2017
To uncompress .7z files, we first need to install 7z.
On OS X, assuming you run Homebrew, the command is:
brew update brew install p7zip
On Debian, run this:
sudo apt-get update sudo apt-get install p7zip
On RedHat systems, run this:
sudo yum install p7zip p7zip-plugins
To extract filename.7z
with their full paths:
7z x filename.7z
To extract filename.7z
in the current directory:
7z e filename.7z
To extract all the .7z files in the current directory:
for file in *.7z; do 7z x "$file"; done
To delete 7z files with b1
in their filename:
find . -name '*b1*' -print0 | xargs -0 rm
To list the files contained in filename.7z
:
7z l filename.7z
To update the archive filename.7z
with .txt files:
7z u filename.7z *.txt
To delete all .txt files in filename.7z
:
7z d filename.7z *.txt
To test the integrity of filename.7z
:
7z t filename.7z
Created on 30 May 2017
Affiliate Disclosure: Some of the links to products on this blog are affiliate links. It simply means, at no additional cost to you, we’ll earn a commission if you click through and buy any product.