Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 7zip archive that I need to extract to another directory as opposed to the directory that the archive is located in however I get the error "Error:Incorrect command line". The command I am running is 7zr e -o extract/ {name_of_archive}.7z. What am I doing wrong?

share|improve this question
    
7zr? Shouldn't that be 7za? Or am I being blond? – user3463 Aug 18 '12 at 8:15
    
On my system (LMDE), installing p7zip gives 7z, 7za and 7zr. According to their man pages, "7z uses plugins to handle archives.", "7za is a stand-alone executable. 7za handles less archive formats than 7z." and "7zr is a stand-alone executable. 7zr handles less archive formats than 7z. 7zr is a "light-version" of 7za that only handles 7z archives." – terdon Aug 18 '12 at 15:25

Try this command instead (you can use 7z,7za or 7zr):

7z x -oextract/ foo.7z

According to the 7z manpage, there should be no space between the '-o' switch and the directory name:

  -o{Directory}
          Set Output directory



7z, 7za and 7zr :

7-Zip  is  a file archiver with the highest compression ratio. The pro‐
       gram supports 7z (that implements LZMA compression  algorithm),  LZMA2,
       XZ,  ZIP,  Zip64,  CAB,  RAR  (if  the  non-free  p7zip-rar  package is
       installed), ARJ, GZIP, BZIP2, TAR,  CPIO,  RPM,  ISO,  most  filesystem
       images  and  DEB  formats.  Compression  ratio  in the new 7z format is
       30-50% better than ratio in ZIP format.
  • 7z uses plugins to handle archives.
  • 7za is a stand-alone executable. 7za handles less archive formats than 7z.
  • 7zr is a stand-alone executable. 7zr handles less archive formats than 7z.
    7zr is a "light-version" of 7za that only handles 7z archives.
share|improve this answer
    
I don't have the command 7z however have 7zr. Does this mean I have to download a specific package and if so what? I am using Linux Ubuntu 12.04LTS – PeanutsMonkey Aug 23 '12 at 20:05
    
@PeanutsMonkey Look at my comment to your question. You can use 7zr, I've updated my answer to that effect. – terdon Aug 24 '12 at 3:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .