Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know that you can extract .7z files with 7-zip.

Is there another standard linux program that can do this? Maybe one of these

tar
bzip2
xz
gzip

I will add that bsdtar can do this, but is not available on all systems.

share|improve this question
    
similar question : 7zip for linux –  Santosh Kumar Mar 31 '12 at 12:38
add comment

5 Answers

up vote 7 down vote accepted

No. 7-Zip archives use LZMA and LZMA2, which are not supported by standard tools (they also use bzip2, but you still need to decode the header).

share|improve this answer
    
Actually, xz uses LZMA as well. But yes, it still won't understand the rest of the 7z format. –  jjlin Mar 31 '12 at 5:32
add comment

7-zip archives can be extracted with p7zip (http://p7zip.sourceforge.net/) on Linux. It is included in the repositories of: Debian, Fedora, Ubuntu and possibly other distributions too.

List contents with (lower case L, for list):

7za l myarchive.7z

Extract contents:

7za x myarchive.7z
share|improve this answer
    
p7zip is available in macports, as a binary. Just: sudo port install p7zip –  smci May 7 at 16:49
add comment

The "standard" way to work with 7-Zip archives on Unix is to use P7ZIP. But since the 7-Zip format was designed primarily for Windows, you shouldn't really expect P7ZIP to come installed on Linux distributions by default.

If you want the benefit of LZMA compression on Unix, prefer XZ Utils.

share|improve this answer
add comment

I tried 7za at first go but it did not work, so I tried using 7z with same options and it works. Here is the example: To Extract: 7z e xy213file.7z

share|improve this answer
add comment

Package p7zip is available in macports, as a binary.

Just: sudo port install p7zip

And you're away! 7z x downloads/myfile.7z

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.