How to create multipart rar archive in linux?



I have Fedora Core 6 installed on my machine and would like to create a
multipart rar archive of a video file for Usenet posting. The video avi
file is about 700Mb so I would like rar to create 15Mb volumes that all
make one big archive like they do in the binary Usenet newsgroups.

I have done this many times with WinRAR but it ties up my machine and I
would rather just copy the file to the Linux box with samba, then create
the rar archive on the CLI because I have rar installed on my Fedora
machine but do not have a GUI interface for it. Once it is on the Linux
machine, I can then putty over to it and open a screen to do the work,
then check back on it later, or just open a term to do it on the machine
or exit gnome and do it. Either way works fine but I like to use screen
as then I can go back and reopen the screen session to check on it or
close it out when it is done from anywhere.

I have tried several times to accomplish this but nothing I have tried
works or does what I want for it to do. Yes I have "man rar" and I have
googled for examples but most of the google pages tell how to extract
files from rar, not how to create multipart rar archives. I can just run
rar at the CLI and get some very terse information but still cannot get
it to work. Here is the basic help I get when I run rar by itself:
-------------------------------------------------------------------------
----
RAR 3.20 Copyright (c) 1993-2003 Eugene Roshal 15 May 2003
Registered to

Usage: rar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract\>

<Commands>
a Add files to archive
c Add archive comment
cf Add files comment
cw Write archive comment to file
d Delete files from archive
e Extract files to current directory
f Freshen files in archive
i[par]=<str> Find string in archives
k Lock archive
l[t,b] List archive [technical, bare]
m[f] Move to archive [files only]
p Print file to stdout
r Repair archive
rc Reconstruct missing volumes
rn Rename archived files
rr[N] Add data recovery record
rv[N] Create recovery volumes
s[name|-] Convert archive to or from SFX
t Test archive files
u Update files in archive
v[t,b] Verbosely list archive [technical,bare]
x Extract files with full path

<Switches>
- Stop switches scanning
ad Append archive name to destination path
ag[format] Generate archive name using the current date
ap<path> Set path inside archive
as Synchronize archive contents
av Put authenticity verification (registered versions only)
av- Disable authenticity verification check
c- Disable comments show
cfg- Disable read configuration
cl Convert names to lower case
cu Convert names to upper case
df Delete files after archiving
dh Open shared files
ds Disable name sort for solid archive
e<attr> Set file exclude attributes
ed Do not add empty directories
en Do not put 'end of archive' block
ep Exclude paths from names
ep1 Exclude base directory from names
ep2 Expand paths to full
f Freshen files
hp[password] Encrypt both file data and headers
idp Disable percentage display
ierr Send all messages to stderr
ilog[name] Log errors to file (registered versions only)
inul Disable all messages
isnd Enable sound
k Lock archive
kb Keep broken extracted files
m<0..5> Set compression level (0-store...3-default...5-maximal)
mc<par> Set advanced compression parameters
md<size> Dictionary size in KB (64,128,256,512,1024,2048,4096 or
A-G)
ms[ext;ext] Specify file types to store
o+ Overwrite existing files
o- Do not overwrite existing files
ol Save symbolic links as the link instead of the file
ow Save or restore file owner and group
p[password] Set password
p- Do not query password
r Recurse subdirectories
r0 Recurse subdirectories for wildcard names only
rr[N] Add data recovery record
rv[N] Create recovery volumes
s[<N>,v[-],e] Create solid archive
s- Disable solid archiving
sfx[name] Create SFX archive
t Test files after archiving
ta<date> Process files modified after <date> in YYYYMMDDHHMMSS
format
tb<date> Process files modified before <date> in YYYYMMDDHHMMSS
format
tk Keep original archive time
tl Set archive time to latest file
tn<time> Process files newer than <time>
to<time> Process files older than <time>
ts<m,c,a>[N] Save or restore file time (modification, creation,
access)
u Update files
v Create volumes with size autodetection or list all
volumes
v<size>[k,b] Create volumes with size=<size>*1000 [*1024, *1]
ver[n] File version control
vn Use the old style volume naming scheme
vp Pause before each volume
w<path> Assign work directory
x<file> Exclude specified file
x@ Read file names to exclude from stdin
x@<list> Exclude files in specified list file
y Assume Yes on all queries
z<file> Read archive comment from file
-------------------------------------------------------------------------
----
Here is what happens when I try to do what I think will make the rar
archive, split into 15Mb chuncks as in:

GoodMovie.rar.rar
GoodMovie.rar.00
GoodMovie.rar.01
GoodMovie.rar.01
....etc.

[ohmster@ohmster post]$ rar a -v 15000 GoodMovie.rar *

RAR 3.20 Copyright (c) 1993-2003 Eugene Roshal 15 May 2003
Registered to

Cannot open GoodMovie.rar
Creating archive 15000.rar

Adding Really Terrific Movie - Part 1.avi 0%
User break
[ohmster@ohmster post]$

Well that for sure did not work, I did a Ctl-c to kill it.

Since I see no option to create an archive, I use the program "rar" with
command "a" to add files. Then I use the "-v" switch to tell it to create
chunks and follow it with the size I want "15000k" as in fifteen hundred
kilobyte chunks, meaning 15Mb. I then tell rar the name of the new
archive will be "GoodMovie.rar" and that it is to add everything in the
current directory to the new archive by using a wildcard, "*". In this
case, the only thing in the current directory is "Really Terrific Movie -
Part 1.avi".

[ohmster@ohmster post]$ ls -lh
total 702M
-rw-r--r-- 1 ohmster ohmster 701M May 6 12:44 Really Terrific Movie -
Part 1.avi
[ohmster@ohmster post]$

I have tried all kinds of variations on this, none of them just creates
the archive in 15Mb chunks the way I want, the way WinRAR does. In
WinRAR, I just right click the file, choose (rar icon) "add to
archive...", then WinRAR comes up and there is the filename with an rar
extension on it that you can change if you want and also a dropdown box
where you can choose a predetermined size such as "1,457.664 - 3.5" (For
a floppy disk I guess) or put your own like I do 15,000,000, then just
click the "OK" button and the process begins, easy as that. No mistakes,
works great.

....but this is Linux, and I want to do this in Linux, and I have to use
the command line with the right commands, switches, and parameters. Can
somebody please, please show me how to do this as I am pulling my hair
out with this one, cannot google for it (Since it is not free, not very
much information on how to use it other than getting files extracted.),
cannot get the gist of the man page or the rar help.

Take this file:
-rw-r--r-- 1 ohmster ohmster 701M May 6 12:44 Really Terrific Movie -
Part 1.avi

Create an rar file of it that is split into 15Mb chunks.

Someone please provide a working example. I am going nuts on this one.
Thank you.
--
~Ohmster
ohmster at ohmster dot com
Put "messageforohmster" in message body
(That is Message Body, not Subject!)
to pass my spam filter.
.


Quantcast