![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| unrar on MPRAS (UNIX) | Mr C | UNIX for Dummies Questions & Answers | 0 | 07-20-2008 09:36 PM |
| Splitting input files into multiple files through AWK command | arund_01 | Shell Programming and Scripting | 3 | 05-13-2008 06:17 AM |
| how to rename multiple files with a single command | tayyabq8 | Shell Programming and Scripting | 5 | 03-18-2008 01:04 PM |
| Command line tool to join multiple .wmv files? | karman | OS X (Apple) | 2 | 09-22-2007 10:52 PM |
| Perform a command to multiple files | mcgrawa | UNIX for Dummies Questions & Answers | 4 | 09-25-2003 01:40 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I work with multiple archive files, mostly rar. I understand the basics of rar and zip. I'm looking for a way to decompress multiple rar files with a single command. Hopefully each file would be unrared into dir with same name as archive. I normally just do this manually, but sometimes I'm processing up to 30 or more files at a time. So a streamlining process would be helpful. Yesterday, in a Suse linux forum I saw a command that works great with zip:
Quote:
However, I normally work with Rar files so I tried to adapt this command, but I can't get it right. This is what I used: Quote:
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
unrar e extracts files to the current directory, not one specified on the unrar command-line.
Try this: Code:
for i in *.rar
do
mkdir "${i/.rar}"
cd "${i/.rar}"
unrar e "../$i"
cd ..
done
|
|
#3
|
|||
|
|||
|
Thanks you for your quick response. That works great, it does exactly what I want.... :-)
|
|||
| Google The UNIX and Linux Forums |