Question: How do I uncompress a *.7z file ( 7zip file ) in UNIX/Linux ?Can you explain with a simple example?
Answer: Use 7za command to unzip a 7z file ( 7zip file ) on Unix platform as shown below.
Verify whether you have 7za command on your system.
# whereis 7za 7za: /usr/bin/7za /usr/share/man/man1/7za.1.gz
If you don’t have 7za command, install p7zip package as shown below.
Install p7zip to unzip *.7z files on Fedora
# yum install p7zip
Install p7zip to unzip *.7z files on Debian and Ubuntu
$ sudo apt-get install p7zip
Uncompressing a *.7z 7zip files in Linux using 7za
$ 7za e myfiles.7z 7-Zip (A) 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30 p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,1 CPU) Processing archive: ../../myfiles.7z Extracting myfiles/test1 Extracting myfiles/test2 Extracting myfiles/test Extracting myfiles Everything is Ok Folders: 1 Files: 3 Size: 7880 Compressed: 404
7za – command namee – specifies the 7z to be extractedmyfiles.7z – is the file that is to be extracted
Creating a 7zip compression file in Linux
$ 7za a myfiles.7z myfiles/ 7-Zip (A) 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30 p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,1 CPU) Scanning Creating archive myfiles.7z Compressing myfiles/test1 Compressing myfiles/test2 Everything is Ok
Files and sub directories of myfiles/ will be added to the myfiles.7z.
a – add to archivefile.7z – archive file to which these files and dir from dir1 will be added to.
Read More:
- Ubuntu Server: How to Install Chrome
- How to Solve Ubuntu “Failed to fetch” Error
- Grep: How to Find All the Files Containing a String in Linux
- C#: How to Use Itextsharp to Manipulate PDF Files
- How to Solve labelme Install Error in Ubuntu
- How to Download APK Files from Google Play Store
- mysqlclient in Ubuntu: How to Solve mysqlclient Install Error
- How to Solve Xmind Install Error in Ubuntu System
- How to Fix Ubuntu(Linux) mount error(22)
- Ubuntu: How to deal with the fatal: the remote end hung up unexpected error of GIT clone Android kernel
- How to Solve Mujoco Install Error in Ubuntu (Pycharm Run Error)
- Debian9 g++ Compile Error: error: ‘EDOM’ was not declared in this scope
- How to Solve Ubuntu20.04 Compile Error:error while loading shared libraries: libncurses.so.5
- [Solved] Debian Error: Error opening terminal: xterm
- [Solved] Some index files failed to download.They have been ignored, or old ones used instead
- Ubuntu Startup Error: warning failed to connect to lvmetad,falling back to device scanning
- [Solved] Linux — 9 — txt files are copied from windows to Linux and read error
- Linux system service command error: Failed to allocate directory watch: Too many open files
- Git pull error: Your local changes to the following files would be overwritten by me
- [Solved] Ubuntu 20.04 Error: curl: (23) Failure writing output to destination