14

I tried googling around and checked the man page but couldn't find what I was looking for.

Basically need to extract a rar archive to a separate volume. I know:

rar e archive.rar 

will extract it to the current folder but I want to extract it to somewhere else. Can this be achieved without having to first move the archive to that location?

ss44
  • 501
  • 1
  • 4
  • 9

2 Answers2

23
rar x archive.rar path/to/extract/to 

Worked.

ss44
  • 501
  • 1
  • 4
  • 9
  • 1
    What if I want to unrar many files, each file is unrar'ed to a folder with the same name? So If I've file1.rar, file2.rar,..etc, I want with a single command to unrar file1.rar to folder named file1, file2.rar to file2, and so on. – Islam Hassan Apr 08 '15 at 17:08
  • unrar x c:/archive.rar dir .. says no files to extract, unrar 4.20 on win7, solution use backslashes and slash after output dir: unrar x c:\archive.rar dir/ – mosh May 21 '17 at 14:49
  • 1
    Note that the path need to end with a backslash or else it would interpret it as 'extract specified file from archive' instead of 'extract archive to directory' unless the directory already exist. – freeforall tousez Jun 30 '18 at 03:56
2

unrar x /define/path/to/extract/

Caterpillar
  • 1,122
  • 2
  • 22
  • 47