parameter is missing.
Examples:
1) rar a -psecret texts.rar *.txt
add files *.txt and encrypt them with password "secret".
2) rar -p texts.rar *.txt < psw.txt
set contents of psw.txt file as a password.
-p- Do not query password
Do not query password for encrypted files when extracting.
Actually you can specify any invalid password to suppress
the password prompt and force RAR to issue 'incorrect password'
message when extracting an encrypted file. This switch just
sets '-' as a password.
-qo[-|+]
Add quick open information [none|force]
RAR archives store every file header containing information
such as file name, time, size and attributes immediately
before data of described file. This approach is more damage
resistant than storing all file headers in a single continuous
block, which if broken or truncated would destroy the entire
archive contents. But while being more reliable, such file
headers scattered around the entire archive are slower to
access if we need to quickly open the archive contents
in a shell like WinRAR graphical interface.
To improve archive open speed and still not make the entire
archive dependent on a single damaged block, RAR 5.0 archives
can include an optional quick open record. Such record is
added to the end of archive and contains copies of file names
and other file information stored in a single continuous block
additionaly to normal file headers inside of archive.
Since the block is continuous, its contents can be read quickly,
without necessity to perform a lot of disk seek operations.
Every file header in this block is protected with a checksum.
If RAR detects that quick open information is damaged,
it resorts to reading individual headers from inside of archive,
so damage resistance is not lessened.
Quick open record contains the full copy of file header,
which may be several tens or hundreds of bytes per file,
increasing the archive size by the same amount. This size
increase is most noticeable for many small files, when file
data size is comparable to file header. So by default,
if no -qo is specified or -qo without parameter is used,
RAR stores copies of headers only for relatively large files
and continues to use local headers for smaller files.
Concrete file size threshold can depend on RAR version.
Such approach provides a reasonable open speed to archive size
tradeoff. If you prefer to have the maximum archive open speed
regardless of size, you can use -qo+ to store copies of all
file headers. If you need to have the smallest possible archive
and do not care about archive open speed in different programs,
specify -qo- to exclude the quick open information completely.
If you wish to measure the performance effect of this switch,
be sure that archive contents is not stored in a disk cache.
No real disk seeks are performed for cached archive file,
making access to file headers fast even without quick open
record.
-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.
-r- Disable recursion.
Even without -r switch RAR can enable the recursion
automatically in some situations. Switch -r- prohibits it.
If you specify a directory name when archiving and if such
name does not include wildcards, by default RAR adds
the directory contents even if switch -r is not specified.
Also RAR automatically enables the recursion if disk root
without wildcards is specified as a file mask. Switch -r-
disables such behavior.
For example:
rar a -r- arc dirname
command will add only the empty 'dirname' directory and ignore
its contents. Following command:
rar a -r- arc c:\
will compress contents of root c: directory only and
will not recurse into subdirectories.
-r0 Similar to -r, but when used with the commands 'a', 'u', 'f',
'm' will recurse into subdirectories only for those file masks,
which include wildcard characters '*' and '?'.
This switch works only for file names. Directory names without
a file name part, such as 'dirname', are not affected by -r0
and their contents is added to archive completely unless -r-
switch is specified.
Example:
rar a -r0 docs.rar *.doc readme.txt
add *.doc files from the current directory and its subdirectories
and readme.txt only from the current directory to docs.rar
archive. In case of usual -r switch, RAR would search for
readme.txt in subdirectories too.
-ri[:]
Set priority and sleep time. Available only in RAR for Windows.
This switch regulates system load by RAR in multitasking
environment. Possible task priority
values are 0 - 15.
If
is 0, RAR uses the default task priority.
equal to 1 sets the lowest possible priority,
15 - the highest possible.
Sleep time is a value from 0 to 1000 (milliseconds).
This is a period of time that RAR gives back to the system
after read or write operations while compressing or extracting.
Non-zero may be useful if you need to reduce system load
even more than can be achieved with
parameter.
Example:
execute RAR with default priority and 10 ms sleep time:
rar a -ri0:10 backup *.*
-rr[N] Add data recovery record. This switch is used when creating
or modifying an archive to add a data recovery record to
the archive. See the 'rr[N]' command description for details.
-rv[N] Create recovery volumes. This switch is used when creating
a multivolume archive to generate recovery volumes.
See the 'rv[N]' command description for details.
-s Create solid archive. A solid archive is an archive packed by
a special compression method, which treats several or all
files, within the archive, as one continuous data stream.
Solid archiving significantly increases compression, when
adding a large number of small, similar files. But it also
has a few important disadvantages: slower updating of existing
solid archives, slower access to individual files, lower
damage resistance.
Usually files in a solid archive are sorted by extension.
But it is possible to disable sorting with -ds switch or set
an alternative file order using a special file, rarfiles.lst.
Example:
create solid archive sources.rar with 512 KB dictionary,
recursing all directories, starting with the current directory.
Add only .asm files:
rar a -s -md512 sources.rar *.asm -r
-s Create solid groups using file count
Similar to -s, but resets solid statistics after compressing
files. Usually decreases compression, but also
decreases losses in case of solid archive damages.
-sc[objects]
Specify the character set.
'Charset' parameter is mandatory and can have one
of the following values:
U - Unicode UTF-16;
F - Unicode UTF-8;
A - the native single byte encoding, which is ANSI
for Windows version;
O - OEM (DOS) encoding. Windows version only.
Endianness of source UTF-16 files, such as list files
or comments, is detected based on the byte order mark.
If byte order mask is missing, little endian encoding is assumed.
'Objects' parameter is optional and can have one of
the following values:
G - log files produced by -ilog switch;
L - list files;
C - comment files;
R - messages sent to redirected files and pipes (Windows only).
It is allowed to specify more than one object, for example,
-scolc. If 'objects' parameter is missing, 'charset' is applied
to all objects.
This switch allows to specify the character set for files
in -z[file] switch, list files and comment files written by
"cw" command.
Examples:
1) rar a -scol data @list
Read names contained in 'list' using OEM encoding.
2) rar c -scuc -zcomment.txt data
Read comment.txt as Unicode file.
3) rar cw -scuc data comment.txt
Write comment.txt as Unicode file.
4) rar lb -scur data > list.txt
Save archived file names in data.rar to list.txt in Unicode.
-se Create solid groups using extension
Similar to -s, but resets solid statistics if file extension
is changed. Usually decreases compression, but also
decreases losses from solid archive damages.
-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.
In the Windows version default.sfx should be placed in the
same directory as the rar.exe, in Unix - in the user's
home directory, in /usr/lib or /usr/local/lib.
Example:
rar a -sfxwincon.sfx myinst
create SelF-eXtracting (SFX) archive using wincon.sfx
SFX-module.
-si[name]
Read data from stdin (standard input), when creating
an archive. Optional 'name' parameter allows to specify
a file name of compressed stdin data in the created
archive. If this parameter is missing, the name will be
set to 'stdin'.
Example:
type Tree.Far | rar a -siTree.Far tree.rar
will compress 'type Tree.Far' output as 'Tree.Far' file.
-sl
Process only those files, which size is less than
specified in parameter of this switch.
Parameter must be specified in bytes.
-sm
Process only those files, which size is more than
specified in parameter of this switch.
Parameter must be specified in bytes.
-sv Create independent solid volumes
By default RAR tries to reset solid statistics as soon
as possible when starting a new volume, but only
if enough data was packed after a previous reset
(at least a few megabytes).
This switch forces RAR to ignore packed data size and attempt
to reset statistics for volumes of any size. It decreases
compression, but increases chances to extract a part of data
if one of several solid volumes in a volume set was lost
or damaged.
Note that sometimes RAR cannot reset statistics even
using this switch. For example, it cannot be done when
compressing one large file split between several volumes.
RAR is able to reset solid statistics only between separate
files, but not inside of single file.
Ignored if used when creating a non-volume archive.
-sv- Create dependent solid volumes
Disables to reset solid statistics between volumes.
It slightly increases compression, but significantly reduces
chances to extract a part of data if one of several solid
volumes in a volume set was lost or damaged.
Ignored if used when creating a non-volume archive.
-s- Disable solid archiving
-t Test files after archiving. This switch is especially
useful in combination with the move command, so files will be
deleted only if the archive had been successfully tested.
-ta
Process only files modified after the specified date.
Format of the date string is YYYYMMDDHHMMSS.
It is allowed to insert separators like '-' or ':' to
the date string and omit trailing fields. For example,
the following switch is correct: -ta2001-11-20
Internally it will be expanded to -ta20011120000000
and treated as "files modified after 0 hour 0 minutes
0 seconds of 20 November 2001".
-tb
Process only files modified before the specified date.
Format of the switch is the same as -ta.
-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.
-tn