Miscellaneous: Rar

(last edit: 2000-11-22) Rar works almost the same and is compatible with rar for Dos/Win. Here's an example: user@host:/tmp#rar a -r -ep1 -m0 -v1440 myprogram /mnt/cdrom/myprogram/* RAR 2.02 Copyright (c) 1993-97 Eugene Roshal 9 August 1997 Shareware version Type RAR -? for help Evaluation copy. Please register. Creating archive myprogram.rar Adding /mnt/cdrom/myprogram/bla.zip Ok Adding /mnt/cdrom/myprogram/Installer.exe Create next volume ? Yes/No/All a Creating archive myprogram.r00 ... mnt/cdrom/myprogram/Installer.exe Creating archive myprogram.r01 Now you have allot of files beginning with 'myprogram.rar', 'myprogram.r??'. You can unpack these files on FreeBSD, Windows/Dos, Linux etc. user@host:/tmp#rar x myprogram.rar RAR 2.02 Copyright (c) 1993-97 Eugene Roshal 9 August 1997 Shareware version Type RAR -? for help Extracting from myprogram.rar Creating mnt Ok Creating mnt/cdrom Ok Creating mnt/cdrom/myprogram Ok Extracting mnt/cdrom/myprogram/bla.zip Ok Extracting mnt/cdrom/myprogram/Installer.exe Extracting from myprogram.r00 ... mnt/cdrom/myprogram/Installer.exe Extracting from mypgrogram.r01 .... And now you have the program back, woepie!!! Man rar a Add files to archive. Example: rar a myarch Create or update existent archive myarch, adding all files in the current directory: t Test archive files. This command performs a dummy file extraction, writing nothing to the output stream, in order to validate the specified file(s). Examples: Test archives in current directory: rar t * or for Unix: rar t '*' User may test archives in all sub-directories, starting with the current path: rar t -r * or for Unix: rar t -r '*' -ep1 Exclude base dir from names. Do not store the path entered in the command line. Example: all files and directories from the directory tmp will be added to the archive 'pasta', but the path will not include 'tmp\' rar a -ep1 -r pasta 'tmp\*' This is equivalent to the commands: cd tmp rar a -ep1 -r pasta cd .. -m Set compression method: -m0 store do not compress file when adding to archive -m1 fastest use fastest method (less compressive) -m2 fast use fast compression method -m3 normal use normal (default) compression method -m4 good use good compression method (more compressive, but slower) -m5 best use best compression method (slightly more compressive, but slowest) By default RAR uses -m3 method (Normal compression). -r Recurse subdirectories. May be used with commands: a, u, f, m, x, e, t, p, v, l, c, cf and s. When used with the commands 'a', 'u', 'f', 'm' will process files in all sub-directories as well as the current working directory. When used with the commands x, e, t, p, v, l, c, cf or s will process all archives in sub-directories as well as the current working directory. -v[k|b|f] Create volumes with size=*1000 [*1024 | *1]. By default this switch uses as thousands (1000) of bytes (not 1024 x bytes). You may also enter the size in kilobytes using the symbol 'k', in bytes using the symbol 'b' or select one from several predefined values using the symbol 'f' following the numerical value. Predefined values can be 360, 720, 1200, 1440 or 2880 and replaced with corresponding floppy disk size. If the size is omitted, autodetection will be used. If volumes are created on the same drive as the temporary files (current drive by default, but may be changed with the switch '-w'), the autodetected size becomes meaningless. In this case the volume size must be explicitly defined. Example: create archive in volumes of fixed size: rar a -s -v1440 floparch.rar *.* will create solid volumes of size 1440000 bytes.

Click here to go back to the index.