Linux RAR

Status
Not open for further replies.

Hime

Active Member
357
2008
49
10
How to split multiple files with rar in a centos 32 bit server?

For a single file it would be -

rar a -v100m archivename filename.ext

But what if I needed multiple files to be split?

p.s. rapidleech won't help in a 32bit server.
 
6 comments
Can you possibly tell me how to do it from command line?

I am not hosting any Rapidleech, that was only a reference in case anyone suggested.
 
I guess he needs to archive multiple files in different archives, splitted.

If thats the case, then you need a FOR loop to run the same command on multiple files. Lets say you have all the files in a directory, the FOR loop would look like this

Code:
for f in $(ls /path/to/your/files)
 do
   [B]rarname=${f%.*}[/B]
   rar a -v100m rarname f
  done

This way, your archives will also have the same name as the file you are raring.
 
^ He just said it:

Well that was what I said myself...

But I need to do it for multiple files together. Assume I have a movie in a folder(directory) containing-

movie.avi(size 700mb) + subtitle(size 100kb) + nfo(size 150kb)

How to split them in 100mb parts?

EDIT: To clear it more, I can do it by moving them inside a folder & rar the folder itself. But that's not what I want.
 
Last edited:
Status
Not open for further replies.
Back
Top