home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.sunet.sepub/pictures
/
2014.11.ftp.sunet.se-pictures.tar
/
ftp.sunet.se
/
pub
/
pictures
/
ACiD-artpacks
/
programs
/
unix
/
archivers
/
rar20sco.sfx
/
rar.txt
< prev
next >
Wrap
Text File
|
1996-06-27
|
29KB
|
775 lines
User's Manual
~~~~~~~~~~~~~
RAR 2.00 32-bit console version (Unix and Windows)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Welcome to the RAR Archiver!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Introduction
~~~~~~~~~~~~
RAR is a powerful tool which allows you to manage and control archive
files. The archive is usually a regular file, which name has a ".rar"
suffix.
RAR features include:-
* Highly sophisticated, original compression algorithm
* Special compression algorithm optimized for multimedia data
* Better compression than similar tools, using 'solid' archiving
* Authenticity verification (registered version only)
* Self-extracting archives and volumes (SFX)
* Ability to recover physically damaged archives
* Locking, password, file order list, disk volume labels & more ...
Configuration file
~~~~~~~~~~~~~~~~~~
RAR for Unix reads configuration information from the file .rarrc in the
user's home directory (stored in HOME environment variable).
RAR for Windows reads configuration information from the file rar.ini,
placed in the same directory as the rar.exe file.
This file may contain the following strings:
switches=<any RAR switches, separated with a space>
regname=<your registration name>
regcode=<your code as stated in registration>
Log file
~~~~~~~~
If the switch -ilog is specified in the command line or configuration
file, RAR will write informational messages, concerning errors
encountered while processing archives, to a log file. In Unix this file
is named .rarlog and placed in the user's home directory. In Windows it
is named rar.log and placed in the same directory as the rar.exe file.
The file order list for solid archiving - RARFILES.LST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RARFILES.LST contains user-defined file list which tells RAR
the order to add files to a solid archive. It may contain file
names, wildcards and special entry - $default. The default
entry defines the place in order list for files not matched
with other entries in this file. The comment character is ';'.
This file should be placed in the same directory as RAR.
Tips to provide improved compression and speed of operation:
- similar files should be grouped together in the archive;
- frequently accessed files should be placed at the beginning.
RAR command line syntax
~~~~~~~~~~~~~~~~~~~~~~~
Syntax
RAR <command> [ -<switches> ] <archive> <@listfiles...> [ <files...> ]
Description
Command line options (commands and switches) provides control of
creating and managing archives with RAR. The command is a string (or a
single letter) which commands RAR to perform a corresponding action.
Switches are designed to modify the way RAR performs the action. Other
parameters are archive name and files to be archived into or extracted
from the archive.
In a UNIX environment you need to quote wildcards to avoid them being
processed by RAR itself. For example, this command will extract
*.asm files from RAR archives in current path:
rar e '*.rar' '*.asm'
Command could be any of the following:
a Add files to archive.
Example:
rar a myarch
Create or update existent archive myarch, adding all files
in the current directory:
c Add archive comment. Comments are displayed while the archive is
being processed. Comment length is limited to 62000 bytes
Examples:
rar c distrib.rar
Also comments may be added from a file:
rar c -zinfo.txt dummy
cf Add files comment. File comments are displayed when the 'v'
command is given. File comment length is limited to 32767 bytes.
Example:
rar cf bigarch *.txt
cw Write archive comment to specified file.
Example:
rar cw oldarch comment.txt
d Delete files from archive. Note, if the processing of this
command resulted in removing all the files from the archive, the
empty archive would removed.
e Extract files to current directory.
f Freshen files in archive. Updates those files changed since they
were packed to the archive. This command will not add new files
to the archive.
k Lock archive. Any command which intend to change the archive
will be ignored.
Example:
rar k final.rar
l[t] List contents of archive [technical]. Files are listed as with
the 'v' command with the exception of the file path. i.e. only
the file name is displayed. Optional technical information is
displayed when 't' modifier is used.
m[f] Move to archive [files only]. Moving files and directories
results in the files and directories being erased upon
successful completion of the packing operation. Directories will
not be removed if 'f' modifier is used and/or '-ed' switch is
applied.
p Print file to stdout.
r Repair archive. Archive repairing is performed in two stages.
First, the damaged archive is searched for a recovery record
(see 'rr' command). If the archive contains a recovery record
and if the portion of the damaged data is continuous and less
than N*512 bytes, where N is number of recovery sectors placed
into the archive, the chance of successful archive
reconstruction is very high. When this stage has completed, a
new archive will be created, called _RECOVER.RAR.
If a broken archive does not contain a recovery record or if
the archive is not completely recovered due to major damage, a
second stage is performed. During this stage only the archive
structure is reconstructed and it is impossible to recover
files which fail the CRC validation, it is still possible to
recover undamaged files which were inaccessible due to the
broken archive structure. Mostly this is useful for non-solid
archives.
When the second stage is completed, the reconstructed archive
will be saved as _RECONST.RAR.
While the recovery is in progress, RAR may prompt the user for
assistance when a suspicious file is detected.
Suspicious entry
Name: <possibly filename>
Size: <size> Packed: <compressed size>
Add it: Yes/No/All
Answer 'y' to add this entry to the file _RECOVER.RAR.
Example:
rar r buggy.rar
rr[N] Add data recovery record. Optionally, redundant information
(recovery record) may be added to an archive. This will cause
a small increase of the archive size and helps to recover
archived files in case of floppy disk failure or data losses of
any other kind. A recovery record contains up to 8 recovery
sectors. The number of sectors may be specified directly in the
'rr' command (N = 1, 2 .. 8) or if it is not specified by the
user it will be selected automatically according to the archive
size:
Archive size Number of sectors
< 50Kb 2
50Kb-500Kb 4
> 500Kb 8
If data are damaged continuously then each rr-sector helps to
recover 512 bytes of damaged information. This value may be
lower in cases of multiple damage.
The size of the recovery record may be approximately determined
by the formula <archive size>/256 + <number of recovery
sectors>*512 bytes.
s[name] Convert archive to SFX. The archive is merged with SFX-module
(using a module in file default.sfx or specified in the switch).
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 '*'
u Update files in archive. Adds files not already in the archive
and updates files changed since they were packed to the archive.
v[t] Verbosely list the contents of archive [technical].
Files are listed using the format: full pathname, file comment,
original and compressed size, compression ratio, last update
date and time, attributes, CRC, compression method and minimum
RAR version required to extract. Optional technical information
is displayed when 't' modifier is used.
To list the contents of all archive volumes, use an asterisk
('*') in place of the archive file extension or use the '-v'
switch.
Example:
rar vt bambam >bambam.lst
direct archive content list (technical) to a file:
x Extract files with full path.
Example:
rar x -av- -c- dime 10cents.txt
extract specified file to current path. AV check and comment
show are disabled.
Switches (used in conjunction with a command):
-? Display help on commands and switches. The same as when none
or an illegal command line option is entered.
-av Put authenticity verification (registered versions only).
RAR will put, in every new and updated archive, information
concerning the creator, last update time and archive name.
If an archive, containing authenticity verification, is being
modified and this switch is not specified, the authenticity
verification information will be removed.
When extracting, testing, listing or updating and archive with
the '-av' switch, RAR will perform integrity validation and
display the message:
Verifying authenticity information ...
In the case of successful authenticity verification, the message
'Ok', creator name and last update information will be
displayed. In the case of authenticity verification failure, the
message 'FAILED' will be displayed.
The Authenticity Verification feature, '-av,' is recommended for
use with archives in a software distribution environment.
In order to enable the Authenticity verification feature, the
program MUST be registered. Please contact your local
distribution site or the world-wide distribution center.
-av- Disable AV checking or adding.
-cfg- Disable read configuration and environment.
-cl Convert file names to lower case.
-cu Convert file names to upper case.
-c- Disable comments show.
-ds Do not sort files while adding to a solid archive.
-ep Exclude paths from names. This switch enables files to be added
to an archive without including the path information. This
could, of course, result in multiple files existing in the
archive with the same name.
-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 ..
-e<atr> Specifies file exclude attributes mask. <atr> is a number in the
decimal, octal (with leading '0') or hex (with leading '0x')
format. If result of bitwise AND between <mask> and file
attributes is nonzero, then file would not be added to archive.
In the Windows version also is possible to use instead of
digital mask symbols D, S, H, A and R to denote directories
and files with system, hidden, archive and read-only attributes.
The order in which the attributes are given is not significant.
-f Freshen files. May be used with archive extraction or creation.
The command string "a -f" is equivalent to the command 'f', you
could also use the switch '-f' with the commands 'm' or 'mf'. If
the switch '-f' is used with the commands 'x' or 'e', then only
old files would be replaced with new versions extracted from the
archive.
-ierr Send all messages to stderr.
-ilog Log errors to file.
-inul Disable all messages.
-isnd Enable sound.
-m<n> 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).
-md<n> Select dictionary size <n> in Kb. Must be 64, 128, 256, 512 or
1024. or a letter 'a', 'b', 'c', 'd' or 'e' respectively.
The sliding dictionary is a special memory area used by the
compression algorithm. If the size of the file being compressed
(or the total files size in the case of a solid archive) is
greater than the dictionary size, then increasing the dictionary
size will generally increase compression ratio, decrease packing
speed and increase memory requirements.
Default sliding dictionary size in 32-bit versions of RAR is 256
Kb. In RAR versions for Unix, Windows and other 32-bit platforms
it is possible to select five different sizes: 64, 128, 256, 512
or 1024 Kb. Besides, speed of extraction in these versions does
not depend upon dictionary size. In 16-bit version RAR for DOS
the sliding dictionary size is fixed and equal to 64 Kb.
Though RAR for DOS provides extracting files from large
dictionary archives.
The amount of memory required to create large dictionary
archives is determined as 5*<dictionary size>+150Kb. About 1 Mb
is required for extraction and 5*<dictionary size>+1150Kb to
update solid archives.
RAR for DOS can extract from large dictionary archives using
conventional, EMS and disk memory. If no EMS or disk
cache is available, the operation may slow down significantly. RAR
for DOS cannot convert large dictionary archives to SFX with the
default SFX module and cannot update such solid archives.
Example:
RAR a -s -mdd sources *.asm
or
RAR a -s -md512 sources *.asm
Will create a solid archive using a 512 Kb dictionary.
-mm[f] Multimedia compression [force]. Enables a special multimedia
compression algorithm. It is intended to compress digital audio
data containing up to four 8-bit or two 16-bit channels. It
works well with true color (24-bit) bitmaps as well.
Improvement in the compression ratio up to 30% over the normal
compression may be achieved.
When archiving file in the multimedia mode RAR performs
intelligent data analysis and may use, for different parts of
the file, general or multimedia compression depending on which
is more suitable. Such analysis allows optimum performance when
different data types are merged in the same file. The 'f'
modifier forces the multimedia compression to be used for the
whole file; it may help when certain multimedia files are to be
compressed, but in most cases only increases archive size.
Both the -m<N> "Set compression method" and -s "Create solid
archive" switches can be used with multimedia compression,
but they are in effect for those file parts where the general
algorithm applies.
If -mm is used with non-multimedia data, the compression ratio
is usually unchanged in comparison with the general method, but
due to multimedia analysis overhead, the packing speed is always
slower. The usage of -mm is not recommended with normal data
files.
Example:
rar a -m5 -s -mm All_My_Songs.rar *.wav
Use the tightest compression method, solid archiving and
multimedia compression with smart analysis, which method
should be applied for particular data:
-ol Save symbolic links as the link instead of the file.
Unix versions only.
-ow Save file owner and group information.
Unix versions only.
-o+ Overwrite existing files.
-o- Do not overwrite existing files.
-p<p> Encrypt files with the string <p> as password while archiving.
The password is case-sensitive. If you omit the password on the
command line, you will be prompted with message "Enter password".
Example:
rar a -pmyhoney secret1 *.txt
encrypt files *.txt with password "myhoney".
-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.
-ri<p>[:<s>]
Set priority and sleep time. Available only in RAR for Windows.
This switch is used to regulate system load by RAR in a
multitasking environment. The possible task priority values are
from 0 to 15. When <p> is equal to 0, the default task priority
is used, 1 corresponding to the lowest task priority, 15 - to
the highest. The sleep time <s> is a value from 0 to 1000
(milliseconds). This is the period of time that RAR will give
back to system after every read or write during the packing or
unpacking operation. The sleep time setting is useful when
several tasks with the same priority are running in the system.
Example:
WinRAR a -r -sfx -ri0:10 backup *.*
execute RAR with default priority and 10 ms of sleep after
each read or write.
-rr[N] Add a data recovery record. This switch is used when creating or
modifying archive to add a data recovery record to the archive.
See the 'rr[N]' command description for details.
-s Create solid archive. Solid is a special archive type. Please
refer to the appendix "Glossary" for further information.
Example:
rar a -s -md512 sources.rar *.asm -r
create solid archive sources.rar with 512 Kb dictionary,
recursing all directories, starting with the current directory.
Add only .asm files:
-sfx[name]
Create SFX archives. If this switch is used when creating a new
archive, a Self-Extracting archive (using a module in file
default.sfx or specified in the switch) would be created.
Example:
rar a -sfxidos.sfx -zscript.s myinst
create SelF-eXtracting (SFX) archive using specified SFX-module
and special installation script.
-tk Keep original archive date. Prevents RAR from modifying the
archive date when changing an archive.
-tl Set archive time to newest file. Forces RAR to set the date of a
changed archive to the date of the newest file in the archive.
-u Update files. May be used with archive extraction or creation.
The command string "a -u" is equivalent to the command 'u', you
could also use the switch '-u' with the commands 'm' or 'mf'. If
the switch '-u' is used with the commands 'x' or 'e', then files
not present on the disk and files newer than their copies on the
disk would extracted from the archive.
-v<n>[k|b] Create volumes with size=<size>*1000 [*1024 | *1].
By default this switch uses <size> as thousands (1000) of bytes
(not 1024 x bytes). You may also enter the size in kilobytes
using the symbol 'k' or in bytes using the symbol 'b' following
the numerical value. 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.
If volumes are created on a drive OTHER than the drive
containing the temporary files, then after the first volume has
been created, the user will be prompted with:
Create next volume: Yes/No/All/Quit
At this moment in time, you should change the disks. Answering
'A' will cause all volumes to be created without a pause.
The first volume file in a multi-volume set has the extension
.RAR, following volumes are numbered from .R00 to .R99.
When extracting or testing a multi-volume archive you must use
only the first volume name (*.RAR). If there is no next volume
on the drive (and volumes are not placed in the same directory
as the temporary files), the user will be prompted with:
Insert disk with <next volume name>
Insert the disk with the correct volume and press any key.
If while extracting, the next volume is not found and volumes
are placed in the same directory as the temporary files, RAR
will abort with the error message:
Cannot find <volume name>
Cannot change disk with temporary files
Archive volumes may not be modified. The commands 'd', 'f', 'u',
's' can not be used with Multi-volume sets. The command 'a' may
be used only for the creation of a new multi-volume sequence.
It is possible, although unlikely, that the file size, of a file
in a multi-volume set, could be greater than it's uncompressed
size. This is due to the fact that 'storing' (no compression if
size increases) cannot be enabled for multi-volume sets.
Archive volumes may be Self-Extracting (SFX). Such an archive
should be created using both the '-v' and '-sfx' switches.
Example:
create archive in volumes of fixed size:
rar a -s -v1440 floparch.rar *.*
will create solid volumes of size 1440000 bytes.
-w<p> Assign work directory as <p>. This switch may be used to assign
the directory for temporary files.
-x<f> Exclude specified file<f>, wildcards may be used. You may
specify the switch '-x' several times:
Example:
rar a -r -x*.bak -x*.rar rawfiles
*.bak and *.rar files will not be added to rawfiles
-x@<lf> Exclude files using specified list file.
Example:
rar a -x@exlist.txt arch *.exe
-y Assume Yes on all queries.
-z<f> Read archive comment from file<f>.
Environment variable
~~~~~~~~~~~~~~~~~~~~
Default parameters may be added to the RAR command line by establishing
an environment variable "RAR".
For instance, in UNIX following lines may be added to your profile:
RAR='-s -md1024'
export RAR
RAR will use this string as default parameters in the command line and
will create "solid" archives with 1024 Kb sliding dictionary size.
RAR handles options with priority as following:
command line switches highest priority
switches in the RAR variable lower priority
switches saved in configuration file lowest priority
Limitations
~~~~~~~~~~~
Pathname is limited to 259 symbols.
Maximum archive comment length is 62000 bytes.
Command limitations:
The commands 'd','u','f' will not operate with archive volumes.
The command 'a' cannot be used to update an archive volume, only to
create one.
The commands 'c' and 'cf' will not operate with archive volumes, but
will work with solid archives.
Exit values
~~~~~~~~~~~
RAR exits with a zero code (0) in case of successful operation. The exit
code of non-zero means the operation is cancelled due to error:
255 USER BREAK User stopped the process
8 MEMORY ERROR Not enough memory for operation
7 USER ERROR Command line option error
6 OPEN ERROR Open file error
5 WRITE ERROR Write to disk error
4 LOCKED ARCHIVE Attempt to modify an archive previously locked
by the 'k' command
3 CRC ERROR A CRC error occurred when unpacking
2 FATAL ERROR A fatal error occurred
1 WARNING Non fatal error(s) occurred
0 SUCCESS Successful operation (User exit)
Glossary
~~~~~~~~
Archive Special file containing one or more files optionally
encoded and/or compressed.
Compression A method of encoding data to reduce it's size.
CRC Cyclic Redundancy Check. Mathematical method calculating
special checking information for data validity.
SFX Archive module used to extract files from when executed.
(SelF-eXtracting module), usually in the form of a .EXE
file.
Solid An archive packed using a special compression method which
sees all files as one continuous data stream. Particularly
advantageous when packing a large number of small files.
Volume Part of a split archive. Splitting an archive to volumes
allows storing them on diskettes. Volumes must be extracted
starting from first in sequence.
Copyrights
(c) 1993-96 Eugene Roshal