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
add files *.txt and encrypt them with password "myhoney".
-p- Do not query password
-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 subdirectories only for those names, which
include wildcard characters '*' and '?'
-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 every read or write operation 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 a 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. Solid is a special archive type. Please
refer to the appendix "Glossary" for further information.
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
Similar to -s, but reset solid statistics after compressing
decreases losses in case of solid archive damages.
-sc
Specify the character set for list files and archive
comment files.
'Charset' parameter is mandatory and can have one
of the following values:
U - Unicode;
A - ANSI (Windows) encoding. Windows version only;
O - OEM (DOS) encoding. Windows version only.
Files in Unicode format must have FFFE or FEFF Unicode
character in the beginning, otherwise RAR will ignore
this switch and process the file as ASCII text.
'Objects' parameter is optional and can have one of
the following values:
L - list files;
C - comment files.
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.
-se Create solid groups using extension
Similar to -s, but reset 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'. This switch cannot be used with -v.
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
-sm
Process only those files, which size is more than
specified in
Parameter
-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