Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Do you need to extract to the current directory? If not then make a new directory and change into it, extract the original rar files. extract from any rar files. 5 lines. Commented Oct 19, 2019 at 1:15
  • I think I do not, and I had not thought about that. Will definitely give it a try tomorrow if nothing else. Thank you! Commented Oct 19, 2019 at 1:25
  • @icarus I saw your edit, would you care to explain what set -- *.rar and [ -e "$1" ] does do exactly? Commented Oct 19, 2019 at 14:21
  • This handles the case where there are no rar files inside the original rar files. The set -- *.rar sets $1 to the first rar file, $2 to the second and so on. If there are none then it sets $1 to the string *.rar. The [ -e "$1" ] tests to see if $1 exists, and the && says "run the thing on the left and if it works then run the thing on the right". Commented Oct 19, 2019 at 15:31
  • @icarus Hm, apparently the -r option does not seem to work for me, I thought it did. I only find and extract top-level RAR files. Commented Oct 20, 2019 at 14:00