Decompress 7z files from Linux CLI:


This is useful when trying to decompress from my Pi2019 server for example I cant close the window, but at least don't need to move the archive to my laptop, then move back.

To install:

sudo apt install p7zip-full

To run:

Make sure I got permissions to write to (Or I waste large amounts of time that leads to an error at the end) that folder though: sudo chmod -R 777 /NAS

Then navigate to the right folder I want to extract to: cd target_directory

Then extract the file with: 7z x /path/to/archive.7z

Then regive permissions so I can access from laptop: sudo chmod -R 777 /NAS

Source | Date: September 19th, 2021


Back

© 2019 to 2025 Branden Gilfoil & © up to 2025 for respective owners.