Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Unrar Multiple Files with Command Post 302234480 by Annihilannic on Tuesday 9th of September 2008 08:00:09 PM
Old 09-09-2008
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

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Perform a command to multiple files

How do I perform a command to multiple files? For example, I want to look at all files in a directory and print the ones that do not contain a certain string. How do I go about doing this? (4 Replies)
Discussion started by: mcgrawa
4 Replies

2. Shell Programming and Scripting

Splitting input files into multiple files through AWK command

Hi, I needs to split *.txt files from single directory depends on the some mutltiple input values. i have wrote the code like below for file in *.txt do grep -i -h "value1|value2" $file > $file; done. My requirment is more input values needs to be given in grep; let us say 50... (3 Replies)
Discussion started by: arund_01
3 Replies

3. Shell Programming and Scripting

how to use multiple files in sed with w command

i have a command like : sed -n 's/^* /&/w even' <file if i want to write to multiple files like sed -n 's/^* /&/w zero two three' < file its not working it is taking "zero two three" as a single file i want to write to 3 seperate files . pls can anyone help me (2 Replies)
Discussion started by: santosh1234
2 Replies

4. Shell Programming and Scripting

unrar multiple files with password

The problem: how to unrar multiple rar files with known password This works fine: but how to/what to implement to prevent asking me for password each time Have tried: but it wont work. Any help appreciated. (2 Replies)
Discussion started by: vampirex
2 Replies

5. Shell Programming and Scripting

using mv command for moving multiple files in a folder

Hi, I have a requirement where I need to move Bunch of folders containing multiple files to another archive location. i want to use mv command .I am thinking when we use mv command to move directory does it create directory 1st and then move all the files ? e.g source... (4 Replies)
Discussion started by: rkmbcbs
4 Replies

6. Shell Programming and Scripting

SED command using multiple input files

What is the syntax to use multiple input files in a SED command. i.e. substitute a word with a phrase in every file in a directory. for every file in /usr/include that has the word "date" in the file grep -l '\<date\>' /usr/include/*.h find each occurrence of the word "time" in the file &... (3 Replies)
Discussion started by: sheoguey
3 Replies

7. Shell Programming and Scripting

finding multiple files using find command

I am trying to search for 2 files using the find command as below find -name file1.txt -a -name file2.txt It doesn't give a result although the files exist in the folder, however when i try the following find -name file1.txt -o -name file2.txt It does give me the result. ./file2.txt... (4 Replies)
Discussion started by: vivek_damodaran
4 Replies

8. UNIX for Dummies Questions & Answers

Grep multiple strings in multiple files using single command

Hi, I will use below command for grep single string ("osuser" is search string) ex: find . -type f | xarg grep -il osuser but i have one more string "v$session" here i want to grep in which file these two strings are present. any help is appreciated, Thanks in advance. Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies

9. Shell Programming and Scripting

unrar files

Hi, I have two .rar files on unix server. but how to unrar these files ?? (6 Replies)
Discussion started by: milink
6 Replies

10. Shell Programming and Scripting

Inputting multiple files into one command

I am trying to read 30 files into a command. The first file contains 10 lines and goes into this part of the command as "x" /tmp/filearrange.sh $x The group of files (20 files, I call them variable $i) need to be the second argument in the command and they need to be read so that they are... (9 Replies)
Discussion started by: newbie2010
9 Replies
UNRAR-FREE(1)						      General Commands Manual						     UNRAR-FREE(1)

NAME
unrar-free -- extract files from rar archives SYNOPSIS
unrar-free [-xtfp?V] [--extract] [--list] [--force] [--extract-newer] [--extract-no-paths] [--password] [--help] [--usage] [--ver- sion] ARCHIVE [FILE ...] [DESTINATION] DESCRIPTION
unrar-free is a program for extracting files from rar archives. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. -x --extract Extract files from archive (default). -t --list List files in archive. -f --force Overwrite files when extracting. --extract-newer Only extract newer files from the archive. --extract-no-paths Don't create directories while extracting. -p --password Decrypt archive using a password. -? --help Show program help. --usage Show short program usage message. -V --version Show version of program. NON-FREE UNRAR COMPATIBLE SYNOPSIS unrar-free [elvx] [-ep] [-o+] [-o-] [-ppassword] [-u] [--] ARCHIVE [FILE ...] [DESTINATION] This syntax should only be used in front-end programs which are using non-free unrar as a back-end. It is recommended to use this program by GNU command line syntax. e Extract files from archive without full path. l List files in archive. v Verbose list files in archive. x Extract files from archive with full path. -ep Don't create directories while extracting. -o+ Overwrite files when extracting. -o- Don't overwrite files when extracting. -p Decrypt archive using a password. -u Only extract newer files from the archive. -- Disable further switch processing. Any switch after the -- are treated as filenames and destination. BUGS
Advanced features of version 3.0 archives are not currently supported. AUTHORS
unrar-free was written by Ben Asselstine based on UniquE RAR File Library by Christian Scheurer and Johannes Winkelmann. This manual page was written by Niklas Vainio <niklas.vainio@iki.fi> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version pub- lished by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. UNRAR-FREE(1)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy