.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "RAR 1" .TH RAR 1 "2013-09-09" " " "RAR User's Manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" rar \- RAR archiver console version .SH "SYNOPSIS" .IX Header "SYNOPSIS" .ie n .IP "\fBrar\fR \fIcommand\fR [\fIswitches\fR] \fIarchive\fR [\fIfile...\fR] [\fI\fI@listfile\fI...\fR] [\fIpath_to_extract\e\fR]" 4 .el .IP "\fBrar\fR \fIcommand\fR [\fIswitches\fR] \fIarchive\fR [\fIfile...\fR] [\fI\f(CI@listfile\fI...\fR] [\fIpath_to_extract\e\fR]" 4 .IX Item "rar command [switches] archive [file...] [@listfile...] [path_to_extract]" .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBrar\fR is a console application allowing to manage archive files in command line mode. \fBrar\fR provides compression, encryption, data recovery and many other functions described in this manual. .PP \&\fBrar\fR supports only \s-1RAR\s0 format archives, which have .rar file name extension by default. \s-1ZIP\s0 and other formats are not supported. Even if you specify .zip extension when creating an archive, it will still be in \s-1RAR\s0 format. Windows users may install WinRAR, which supports more archive types including \s-1RAR\s0 and \s-1ZIP\s0 formats. .PP Command line \fIoptions\fR (\fIcommands\fR and \fIswitches\fR) provide control of creating and managing archives with \fBrar\fR. The \fIcommand\fR is a string (or a single letter) which commands \fBrar\fR to perform a corresponding action. \fISwitches\fR are designed to modify the way \fBrar\fR performs the action. Other parameters are archive name and files to be archived into or extracted from the archive. .PP \&\fIListfiles\fR are plain text files that contain names of files to process. File names should start at the first column. It is possible to put comments to the listfile after \f(CW\*(C`//\*(C'\fR characters. For example, you may create backup.lst containing the following strings: .PP .Vb 3 \& c:\ework\edoc\e*.txt //backup text documents \& c:\ework\eimage\e*.bmp //backup pictures \& c:\ework\emisc .Ve .PP and then run: .PP .Vb 1 \& rar a backup @backup.lst .Ve .PP If you wish to read file names from stdin (standard input), specify the empty listfile name (just \f(CW\*(C`@\*(C'\fR). .PP By default, console \fBrar\fR uses the single byte encoding in list files, but it can be redefined with \fB\-sc\fR\fI\fR\fBl\fR switch. .PP You may specify both usual file names and list files in the same command line. If neither files nor listfiles are specified, then \f(CW\*(C`*.*\*(C'\fR is implied and \fBrar\fR will process all files. .PP Many \fBrar\fR commands, such as extraction, test or list, allow to use wildcards in archive name. If no extension is specified in archive mask, \&\fBrar\fR assumes \f(CW\*(C`.rar\*(C'\fR, so \f(CW\*(C`*\*(C'\fR means all archives with \f(CW\*(C`.rar\*(C'\fR extension. If you need to process all archives without extension, use \f(CW\*(C`*.\*(C'\fR mask. \&\f(CW\*(C`*.*\*(C'\fR mask selects all files. Wildcards in archive name are not allowed when archiving and deleting. .PP In Unix you need to enclose \fBrar\fR command line parameters containing wildcards in single or double quotes to prevent their expansion by Unix shell. For example, this command will extract *.asm files from all *.rar archives in current directory: .PP .Vb 1 \& rar e \*(Aq*.rar\*(Aq \*(Aq*.asm\*(Aq .Ve .SH "COMMAND" .IX Header "COMMAND" \&\fIcommand\fR could be any of the following: .IP "\fBa\fR" 4 .IX Item "a" Add files to archive. .Sp Examples: .Sp 1) add all *.hlp files from the current directory to the archive help.rar: .Sp .Vb 1 \& rar a help *.hlp .Ve .Sp 2) archive all files from the current directory and subdirectories to 362000 bytes size solid, self-extracting volumes and add the recovery record to each volume: .Sp .Vb 1 \& rar a \-r \-v362 \-s \-sfx \-rr save .Ve .Sp Because no file names are specified, all files (*) are assumed. .Sp 3) as a special exception, if directory name is specified as an argument and if directory name does not include file masks and trailing backslashes, the entire contents of the directory and all subdirectories will be added to the archive even if switch \-r is not specified. .Sp The following command will add all files from the directory Bitmaps and its subdirectories to the \s-1RAR\s0 archive Pictures.rar: .Sp .Vb 1 \& rar a Pictures.rar Bitmaps .Ve .Sp 4) if directory name includes file masks or trailing backslashes, normal rules apply and you need to specify switch \-r to process its subdirectories. .Sp The following command will add all files from directory Bitmaps, but not from its subdirectories, because switch \-r is not specified: .Sp .Vb 1 \& rar a Pictures.rar Bitmaps\e* .Ve .IP "\fBc\fR" 4 .IX Item "c" Add archive comment. Comments are displayed while the archive is being processed. Comment length is limited to 62000 bytes .Sp Examples: .Sp .Vb 1 \& rar c distrib.rar .Ve .Sp Also comments may be added from a file using \-z[file] switch. The following command adds a comment from info.txt file: .Sp .Vb 1 \& rar c \-zinfo.txt dummy .Ve .IP "\fBch\fR" 4 .IX Item "ch" Change archive parameters. .Sp This command can be used with most of archive modification switches to modify archive parameters. It is especially convenient for switches like \&\-cl, \-cu, \-tl, which do not have a dedicated command. .Sp It is not able to recompress, encrypt or decrypt archive data and it cannot merge or create volumes. If used without any switches, 'ch' command just copies the archive data without modification. .Sp Example: .Sp Set archive time to latest file: .Sp .Vb 1 \& rar ch \-tl files.rar .Ve .IP "\fBcw\fR" 4 .IX Item "cw" Write archive comment to specified file. .Sp Format of output file depends on \-sc switch. .Sp If output file name is not specified, comment data will be sent to stdout. .Sp Examples: .Sp .Vb 3 \& rar cw arc comment.txt \& rar cw \-scuc arc unicode.txt \& rar cw arc .Ve .IP "\fBd\fR" 4 .IX Item "d" Delete files from archive. Please note if the processing of this command results in removing all the files from the archive, the empty archive would removed. .IP "\fBe\fR" 4 .IX Item "e" Extract files without archived paths. .Sp Extract files excluding their path component, so all files are created in the same destination directory. .Sp Use '\fBx\fR' command if you wish to extract full pathnames. .Sp Example: .Sp .Vb 1 \& rar e \-or html.rar *.css css\e .Ve .Sp extract all *.css files from html.rar archive to 'css' folder excluding archived paths. Rename extracted files automatically in case several files have the same name. .IP "\fBf\fR" 4 .IX Item "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. .IP "\fBi[i|c|h|t]=\fR\fI\fR" 4 .IX Item "i[i|c|h|t]=" Find string in archives. .Sp Supports following optional parameters: .Sp \&\fBi\fR \- case insensitive search (default); .Sp \&\fBc\fR \- case sensitive search; .Sp \&\fBh\fR \- hexadecimal search; .Sp \&\fBt\fR \- use \s-1ANSI,\s0 Unicode and \s-1OEM\s0 character tables (Windows only); .Sp If no parameters are specified, it is possible to use the simplified command syntax \fBi\fR\fI\fR instead of \fBi=\fR\fI\fR .Sp It is allowed to specify 't' modifier with other parameters, for example, ict=string performs case sensitive search using all mentioned above character tables. .Sp Examples: .Sp .Vb 1 \& rar "ic=first level" \-r c:\e*.rar *.txt .Ve .Sp Perform case sensitive search of \*(L"first level\*(R" string in *.txt files in *.rar archives on the disk c: .Sp .Vb 1 \& rar ih=f0e0aeaeab2d83e3a9 \-r e:\etexts .Ve .Sp Search for hex string f0 e0 ae ae ab 2d 83 e3 a9 in rar archives in e:\etexts directory. .IP "\fBk\fR" 4 .IX Item "k" Lock archive. Any command which intends to change the archive will be ignored. .Sp Example: .Sp .Vb 1 \& rar k final.rar .Ve .IP "\fBl[t[a],b]\fR" 4 .IX Item "l[t[a],b]" List archive contents \fB[technical [all], bare]\fR. .Sp \&'l' command lists archived file attributes, size, date, time and name, one file per line. If file is encrypted, line starts from '*' character. .Sp \&'lt' displays the detailed file information in multiline mode. This information includes file checksum value, host \s-1OS,\s0 compression options and other parameters. .Sp \&'lta' provide the detailed information not only for files, but also for service headers like \s-1NTFS\s0 streams or file security data. .Sp \&'lb' lists bare file names with path, one per line, without any additional information. .Sp You can use \-v switch to list contents of all volumes in volume set: rar l \-v vol.part1.rar .Sp Commands 'lt', 'lta' and 'lb' are equal to 'vt', 'vta' and 'vb' correspondingly. .IP "\fBm[f]\fR" 4 .IX Item "m[f]" Move to archive \fB[files only]\fR. 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. .IP "\fBp\fR" 4 .IX Item "p" Print file to stdout. .Sp You may use this command together with \-inul switch to disable all \s-1RAR\s0 messages and print only file data. It may be important when you need to send a file to stdout for use in pipes. .IP "\fBr\fR" 4 .IX Item "r" Repair archive. Archive repairing is performed in two stages. First, the damaged archive is searched for a recovery record (see 'rr' command). If archive contains the previously added recovery record and if damaged data area is continuous and smaller than error correction code size in recovery record, chance of successful archive reconstruction is high. When this stage has been completed, a new archive is created, named as fixed.arcname.rar, where 'arcname' is the original (damaged) archive name. .Sp If broken archive does not contain a recovery record or if archive is not completely recovered due to major damage, second stage is performed. During this stage only the archive structure is reconstructed and it is impossible to recover files which fail checksum validation, it is still possible, however, to recover undamaged files, which were inaccessible due to the broken archive structure. Mostly this is useful for non-solid archives. This stage is never efficient for archives with encrypted file headers, which can be repaired only if recovery record is present. .Sp When the second stage is completed, the reconstructed archive is saved as rebuilt.arcname.rar, where 'arcname' is the original archive name. .Sp By default, repaired archives are created in the current directory, but you can append an optional destpath\e parameter to specify another destination directory. .Sp Example: .Sp .Vb 1 \& rar r buggy.rar c:\efixed\e .Ve .Sp repair buggy.rar and place the result to 'c:\efixed' directory. .IP "\fBrc\fR" 4 .IX Item "rc" Reconstruct missing and damaged volumes using recovery volumes (.rev files). You need to specify any existing volume as the archive name, for example, 'rar rc backup.part03.rar' .Sp Read 'rv' command description for information about recovery volumes. .IP "\fBrn\fR" 4 .IX Item "rn" Rename archived files. .Sp The command syntax is: .Sp .Vb 1 \& rar rn ... .Ve .Sp For example, the following command: .Sp .Vb 1 \& rar rn data.rar readme.txt readme.bak info.txt info.bak .Ve .Sp will rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar. .Sp It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. For example: .Sp .Vb 1 \& rar rn data.rar *.txt *.bak .Ve .Sp will rename all *.txt files to *.bak. .Sp \&\fBrar\fR does not check if the destination file name is already present in the archive, so you need to be careful to avoid duplicated names. It is especially important when using wildcards. Such a command is potentially dangerous, because a wrong wildcard may corrupt all archived names. .IP "\fBrr\fR\fI[N]\fR" 4 .IX Item "rr[N]" Add data recovery record. Optionally, redundant information (recovery record) may be added to archive. While it increases the archive size, it helps to recover archived files in case of disk failure or data loss of other kind, provided that damage is not too severe. Such damage recovery can be done with command \*(L"r\*(R" (repair). .Sp \&\s-1RAR 4\s0.x and \s-1RAR 5.0\s0 archives use different recovery record structure and algorithms. .Sp \&\s-1RAR 4\s0.x recovery record is based on \s-1XOR\s0 algorithm. You can specify 4.x record size as a number of recovery sectors or as a percent of archive size. To specify a number of sectors just add it directly after 'rr', like \&'rr1000' for 1000 sectors. To use a percent append 'p' or '%' modifier after the percent number, such as 'rr5p' or 'rr5%' for 5%. Note that in Windows .bat and .cmd files it is necessary to use 'rr5%%' instead of 'rr5%', because the command processor treats the single '%' as the start of a batch file parameter, so it might be more convenient to use \&'p' instead of '%' in this case. .Sp \&\s-1RAR 4\s0.x recovery sectors are 512 bytes long. If damaged area is continuous, every sector helps to recover 512 bytes of damaged information. This value may be lower in cases of multiple damage. Maximum number of recovery sectors is 524288. .Sp Size of 4.x recovery record may be approximately determined as /256 + *512 bytes. .Sp \&\s-1RAR 5.0\s0 recovery record uses Reed-Solomon error correction codes. Its ability to repair continuous damage is about the same as for \s-1RAR 4\s0.x, allowing to restore slightly less data than recovery record size. But it is significantly more efficient than \s-1RAR 4\s0.x record in case of multiple damaged areas. .Sp \&\s-1RAR 5.0\s0 record does not use 512 byte sectors and you can specify its size only as a percent of archive size. Even if '%' or 'p' modifier is not present, \fBrar\fR treats the value as a percent in case of \s-1RAR 5.0\s0 format, so both 'rr5' and 'rr5p' mean 5%. Due to service data overhead the actual resulting recovery record size only approximately matches the user defined percent and difference is larger for smaller archives. .Sp \&\s-1RAR 5.0\s0 recovery record size cannot exceed the protecting archive size, so you cannot use more than 100% as a parameter. Larger recovery records are processed slower both when creating and repairing. .Sp \&\s-1RAR 5.0\s0 recovery record is more resistant to damage of recovery record itself and can utilize a partially corrupt recovery record data. Note, though, that 'R' repair command does not fix broken blocks in recovery record. Only file data are corrected. After successful archive repair, you may need to create a new recovery record for saved files. .Sp Both 4.x and 5.0 records are most efficient if data positions in damaged archive are not shifted. If you copy an archive from damaged media using some special software and if you have a choice to fill damaged areas with zeroes or to cut out them from copied file, filling with zeroes or any other value is preferable, because it allows to preserve original data positions. Still, even though it is not an optimal mode, both versions of records attempt to repair data even in case of deletions or insertions of reasonable size, when data positions were shifted. \s-1RAR 5.0\s0 recovery record handles deletions and insertions more efficiently than \s-1RAR 4\s0.x. .Sp If you use the plain 'rr' command without optional parameter, \fBrar\fR will set the recovery record size to 3% of archive size by default. .Sp Example: .Sp .Vb 1 \& rar rr5p arcname .Ve .Sp add the recovery record of 5% of archive size. .IP "\fBrv\fR\fI[N]\fR" 4 .IX Item "rv[N]" Create recovery volumes (.rev files), which can be later used to reconstruct missing and damaged files in a volume set. This command makes sense only for multivolume archives and you need to specify the name of the first volume in the set as the archive name. For example: .Sp .Vb 1 \& rar rv3 data.part01.rar .Ve .Sp This feature may be useful for backups or, for example, when you posted a multivolume archive to a newsgroup and a part of subscribers did not receive some of the files. Reposting recovery volumes instead of usual volumes may reduce the total number of files to repost. .Sp Each recovery volume is able to reconstruct one missing or damaged \s-1RAR\s0 volume. For example, if you have 30 volumes and 3 recovery volumes, you are able to reconstruct any 3 missing volumes. If the number of \&.rev files is less than the number of missing volumes, reconstructing is impossible. The total number of usual and recovery volumes must not exceed 255 for \s-1RAR 4\s0.x and 65535 for \s-1RAR 5.0\s0 archive format. .Sp Original \s-1RAR\s0 volumes must not be modified after creating recovery volumes. Recovery algorithm uses data stored both in \s-1REV\s0 files and in \s-1RAR\s0 volumes to rebuild missing \s-1RAR\s0 volumes. So if you modify \s-1RAR\s0 volumes, for example, lock them, after creating \s-1REV\s0 files, recovery process will fail. .Sp Additionally to recovery data, \s-1RAR 5.0\s0 recovery volumes also store service information such as checksums of protected \s-1RAR\s0 files. So they are slightly larger than \s-1RAR\s0 volumes which they protect. If you plan to copy individual \s-1RAR\s0 and \s-1REV\s0 files to some removable media, you need to take it into account and specify \s-1RAR\s0 volume size by a few kilobytes smaller than media size. .Sp The optional parameter specifies a number of recovery volumes to create and must be less than the total number of \s-1RAR\s0 volumes in the set. You may also append a percent character to this parameter, in such case the number of creating .rev files will be equal to this percent taken from the total number of \s-1RAR\s0 volumes. For example: .Sp .Vb 1 \& rar rv15% data.part01.rar .Ve .Sp \&\fBrar\fR reconstructs missing and damaged volumes either when using 'rc' command or automatically, if it cannot locate the next volume and finds the required number of .rev files when unpacking. .Sp Original copies of damaged volumes are renamed to *.bad before reconstruction. For example, volname.part03.rar will be renamed to volname.part03.rar.bad. .IP "\fBs\fR\fI[name]\fR" 4 .IX Item "s[name]" Convert archive to \s-1SFX.\s0 The archive is merged with a \s-1SFX\s0 module (using a module in file \fIdefault.sfx\fR or specified in the switch). In the Windows version \fIdefault.sfx\fR 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. .IP "\fBs\-\fR" 4 .IX Item "s-" Remove \s-1SFX\s0 module from the already existing \s-1SFX\s0 archive. \fBrar\fR creates a new archive without \s-1SFX\s0 module, the original \s-1SFX\s0 archive is not deleted. .IP "\fBt\fR" 4 .IX Item "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). .Sp Examples: .Sp Test archives in current directory: .Sp .Vb 1 \& rar t * .Ve .Sp or for Unix: .Sp .Vb 1 \& rar t \*(Aq*\*(Aq .Ve .Sp User may test archives in all sub-directories, starting with the current path: .Sp .Vb 1 \& rar t \-r * .Ve .Sp or for Unix: .Sp .Vb 1 \& rar t \-r \*(Aq*\*(Aq .Ve .IP "\fBu\fR" 4 .IX Item "u" Update files in archive. Adds files not yet in the archive and updates files that have been changed since they were packed into the archive. .IP "\fBv[t[a],b]\fR" 4 .IX Item "v[t[a],b]" Verbosely list archive contents \fB[technical [all], bare]\fR. .Sp \&'v' command lists archived file attributes, size, packed size, compression ratio, date, time, checksum and name, one file per line. If file is encrypted, line starts from '*' character. For BLAKE2sp checksum only two first and one last symbol are displayed. .Sp \&'vt' displays the detailed file information in multiline mode. This information includes file checksum value, host \s-1OS,\s0 compression options and other parameters. .Sp \&'vta' provide the detailed information not only for files, but also for service headers like \s-1NTFS\s0 streams or file security data. .Sp \&'vb' lists bare file names with path, one per line, without any additional information. .Sp You can use \-v switch to list contents of all volumes in volume set: rar v \-v vol.part1.rar .Sp Commands 'vt', 'vta' and 'vb' are equal to 'lt', 'lta' and 'lb' correspondingly. .IP "\fBx\fR" 4 .IX Item "x" Extract files with full path. .Sp Examples: .Sp 1) extract 10cents.txt to current directory not displaying the archive comment .Sp .Vb 1 \& rar x \-c\- dime 10cents.txt .Ve .Sp 2) extract *.txt from docs.rar to c:\edocs directory .Sp .Vb 1 \& rar x docs.rar *.txt c:\edocs\e .Ve .Sp 3) extract the entire contents of docs.rar to current directory .Sp .Vb 1 \& rar x docs.rar .Ve .SH "SWITCHES" .IX Header "SWITCHES" \&\fIswitches\fR (used in conjunction with a \fIcommand\fR): .IP "\fB\-?\fR" 4 .IX Item "-?" Display help on commands and switches. The same as when none or an illegal command line option is entered. .IP "\fB\-\-\fR" 4 .IX Item "--" Stop switches scanning .Sp This switch tells \fBrar\fR that there are no more switches in the command line. It could be useful, if either archive or file name starts from '\-' character. Without '\-\-' switch such a name would be treated as a switch. .Sp Example: .Sp add all files from the current directory to the solid archive \&'\-StrangeName' .Sp .Vb 1 \& rar a \-s \-\- \-StrangeName .Ve .IP "\fB\-@[+]\fR" 4 .IX Item "-@[+]" Disable [enable] file lists .Sp \&\fBrar\fR treats command line parameters starting from '@' character as file lists. So by default, \fBrar\fR attempts to read 'filename' filelist, when encountering '@filename' parameter. But if '@filename' file exists, \&\fBrar\fR treats the parameter as '@filename' file instead of reading the file list. .Sp Switch \-@[+] allows to avoid this ambiguity and strictly define how to handle parameters starting from '@' character. .Sp If you specify \-@, all such parameters found after this switch will be considered as file names, not file lists. .Sp If you specify \-@+, all such parameters found after this switch will be considered as file lists, not file names. .Sp This switch does not affect processing parameters located before it. .Sp Example: .Sp test the archived file '@home' .Sp .Vb 1 \& rar t \-@ notes.rar @home .Ve .IP "\fB\-ac\fR" 4 .IX Item "-ac" Clear Archive attribute after compression or extraction (Windows version only). .Sp If this switch is specified when archiving, \*(L"Archive\*(R" file attribute is cleared for successfully compressed files. When extracting, this switch will clear \*(L"Archive\*(R" attribute for extracted files. .IP "\fB\-ad\fR" 4 .IX Item "-ad" Append archive name to destination path. .Sp This option may be useful when unpacking a group of archives. By default \&\fBrar\fR places files from all archives in the same directory, but this switch creates a separate directory for files unpacked from each archive. .Sp Example: .Sp .Vb 1 \& rar x \-ad *.rar data\e .Ve .Sp \&\fBrar\fR will create subdirectories below 'data' for every unpacking archive. .IP "\fB\-ag\fR\fI[format]\fR" 4 .IX Item "-ag[format]" Generate archive name using the current date and time. .Sp Appends the current date string to an archive name when creating or processing an archive. Useful for daily backups. .Sp Format of the appending string is defined by the optional \*(L"format\*(R" parameter or by \*(L"\s-1YYYYMMDDHHMMSS\*(R"\s0 if this parameter is absent. The format string may include the following characters: .Sp \&\fBY\fR \- year .Sp \&\fBM\fR \- month .Sp \&\fB\s-1MMM\s0\fR \- month name as text string (Jan, Feb, etc.) .Sp \&\fBW\fR \- a week number (a week starts with Monday) .Sp \&\fBA\fR \- day of week number (Monday is 1, Sunday \- 7) .Sp \&\fBD\fR \- day of month .Sp \&\fBE\fR \- day of year .Sp \&\fBH\fR \- hours .Sp \&\fBM\fR \- minutes (treated as minutes if encountered after hours) .Sp \&\fBI\fR \- minutes (treated as minutes regardless of hours position) .Sp \&\fBS\fR \- seconds .Sp \&\fBN\fR \- archive number. \fBrar\fR searches for already existing archive with generated name and if found, increments the archive number until generating a unique name. 'N' format character is not supported when creating volumes. When performing non-archiving operations like extracting, \fBrar\fR selects the existing archive preceding the first unused name or sets N to 1 if no such archive exists. .Sp Each of format string characters listed above represents only one character added to archive name. For example, use \s-1WW\s0 for two digit week number or \s-1YYYY\s0 to define four digit year. .Sp If the first character in the format string is '+', positions of the date string and base archive name are exchanged, so a date will precede an archive name. .Sp The format string may contain optional text enclosed in '{' and '}' characters. This text is inserted into archive name. .Sp All other characters are added to an archive name without changes. .Sp If you need to process an already existing archive, be careful with \-ag switch. Depending on the format string and time passed since previous \&\-ag use, generated and existing archive names may mismatch. In this case \fBrar\fR will create or open a new archive instead of processing the already existing one. You may use \-log switch to write the generated archive name to a file and then read it from file for further processing. .Sp Examples: .Sp 1) use the default \s-1YYYYMMDDHHMMSS\s0 format .Sp .Vb 1 \& rar a \-ag backup .Ve .Sp 2) use DD-MMM-YY format .Sp .Vb 1 \& rar t \-agDD\-MMM\-YY backup .Ve .Sp 3) use \s-1YYYYMMDDHHMM\s0 format, place date before 'backup' .Sp .Vb 1 \& rar a \-ag+YYYYMMDDHHMM backup .Ve .Sp 4) use YYYY-WW-A format, include fields description .Sp .Vb 1 \& rar a \-agYYYY{year}\-WW{week}\-A{wday} backup .Ve .Sp 5) use \s-1YYYYMMDD\s0 and the archive number. It allows to generate unique names even when \s-1YYYYMMDD\s0 format mask used more than once in the same day .Sp .Vb 1 \& rar a \-agYYYYMMDD\-NN backup .Ve .IP "\fB\-ai\fR" 4 .IX Item "-ai" Ignore file attributes. .Sp If this switch is used when extracting, \fBrar\fR does not set general file attributes stored in archive to extracted files. This switch preserves attributes assigned by operating system to a newly created file. .Sp In Windows it affects archive, system, hidden and read-only attributes. in Unix \- user, group, and others file permissions. .IP "\fB\-ao\fR" 4 .IX Item "-ao" Add files with Archive attribute set (Windows version only). .Sp Example: .Sp add all disk C: files with Archive attribute set to the 'f:backup' and clear files Archive attribute .Sp .Vb 1 \& rar a \-r \-ac \-ao f:backup c:\e*.* .Ve .IP "\fB\-ap\fR" 4 .IX Item "-ap" Set path inside archive. This path is merged to file names when adding files to an archive and removed from file names when extracting. .Sp For example, if you wish to add the file 'readme.txt' to the directory \&'DOCS\eENG' of archive 'release', you may run: .Sp .Vb 1 \& rar a \-apDOCS\eENG release readme.txt .Ve .Sp or to extract '\s-1ENG\s0' to the current directory: .Sp .Vb 1 \& rar x \-apDOCS release DOCS\eENG\e*.* .Ve .IP "\fB\-as\fR" 4 .IX Item "-as" Synchronize archive contents .Sp If this switch is used when archiving, those archived files which are not present in the list of the currently added files, will be deleted from the archive. It is convenient to use this switch in combination with \-u (update) to synchronize contents of an archive and an archiving directory. .Sp For example, after the command: .Sp .Vb 1 \& rar a \-u \-as backup sources\e*.cpp .Ve .Sp the archive 'backup.rar' will contain only *.cpp files from directory \&'sources', all other files will be deleted from the archive. It looks similar to creating a new archive, but with one important exception: if no files are modified since the last backup, the operation is performed much faster than the creation of a new archive. .IP "\fB\-cfg\-\fR" 4 .IX Item "-cfg-" Ignore configuration file and \s-1RAR\s0 environment variable. .IP "\fB\-cl\fR" 4 .IX Item "-cl" Convert file names to lower case. .IP "\fB\-cu\fR" 4 .IX Item "-cu" Convert file names to upper case. .IP "\fB\-c\-\fR" 4 .IX Item "-c-" Disable comments show. .IP "\fB\-df\fR" 4 .IX Item "-df" Delete files after archiving .Sp Move files to archive. This switch in combination with the command \*(L"A\*(R" performs the same action as the command \*(L"M\*(R". .IP "\fB\-dh\fR" 4 .IX Item "-dh" Open shared files .Sp Allows to process files opened by other applications for writing. .Sp This switch helps if an application allowed read access to file, but if all types of file access are prohibited, the file open operation will still fail. .Sp This option could be dangerous, because it allows to archive a file, which at the same time is modified by another application, so use it carefully. .IP "\fB\-dr\fR" 4 .IX Item "-dr" Delete files to Recycle Bin .Sp Delete files after archiving and place them to Recycle Bin. Available in Windows version only. .IP "\fB\-ds\fR" 4 .IX Item "-ds" Do not sort files while adding to a solid archive. .IP "\fB\-dw\fR" 4 .IX Item "-dw" Wipe files after archiving .Sp Delete files after archiving. Before deleting file data are overwritten by zero bytes to prevent recovery of deleted files. .Sp Please be aware that such approach is designed for usual hard disks, but may fail to overwrite the original file data on solid state disks, as result of \s-1SSD\s0 wear leveling technology and more complicated data addressing. .IP "\fB\-ed\fR" 4 .IX Item "-ed" Do not add empty directories .Sp This switch indicates that directory records are not to be stored in the created archive. When extracting such archives, \fBrar\fR creates non-empty directories based on paths of files contained in them. Information about empty directories is lost. All attributes of non-empty directories except a name (access rights, streams, etc.) will be lost as well, so use this switch only if you do not need to preserve such information. .Sp If \-ed is used with 'm' command or \-df switch, \fBrar\fR will not remove empty directories. .IP "\fB\-ee\fR" 4 .IX Item "-ee" Do not process extended attributes .Sp Disables saving and restoring extended file attributes. Only for \s-1OS/2\s0 versions. .IP "\fB\-en\fR" 4 .IX Item "-en" Do not add \*(L"end of archive\*(R" block .Sp Not supported for \s-1RAR 5.0\s0 archives. .Sp By default, \fBrar\fR adds an \*(L"end of archive\*(R" block to the end of a new or updated archive. It allows to skip external data like digital signatures safely, but in some special cases it may be useful to disable this feature. For example, if an archive is transferred between two systems via an unreliable link and at the same time a sender adds new files to it, it may be important to be sure that the already received file part will not be modified on the other end between transfer sessions. .Sp This switch cannot be used with volumes, because the end of archive block contains information important for correct volume processing. .IP "\fB\-ep\fR" 4 .IX Item "-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. .IP "\fB\-ep1\fR" 4 .IX Item "-ep1" Exclude base dir from names. Do not store the path entered in the command line. .Sp Example: .Sp all files and directories from the directory tmp will be added to the archive 'test', but the path in archived names will not include 'tmp\e' .Sp .Vb 1 \& rar a \-ep1 \-r test tmp\e* .Ve .Sp This is equivalent to the commands: .Sp .Vb 1 \& cd tmp rar a \-r ..\etest cd .. .Ve .IP "\fB\-ep2\fR" 4 .IX Item "-ep2" Expand paths to full. Store full file paths (except the drive letter and leading path separator) when archiving. .IP "\fB\-ep3\fR" 4 .IX Item "-ep3" Expand paths to full including the drive letter. Windows version only. .Sp This switch stores full file paths including the drive letter if used when archiving. Drive separators (colons) are replaced by underscore characters. .Sp If you use \-ep3 when extracting, it will change underscores back to colons and create unpacked files in their original directories and disks. If the user also specified a destination path, it will be ignored. .Sp It also converts \s-1UNC\s0 paths from \e\eserver\eshare to _\|_server\eshare when archiving and restores them to the original state when extracting. .Sp This switch can help to backup several disks to the same archive. For example, you may run: .Sp .Vb 1 \& rar a \-ep3 \-r backup.rar c:\e d:\e e:\e .Ve .Sp to create backup and: .Sp .Vb 1 \& rar x \-ep3 backup.rar .Ve .Sp to restore it. .Sp But be cautious and use \-ep3 only if you are sure that extracting archive does not contain any malicious files. In other words, use it if you have created an archive yourself or completely trust its author. This switch allows to overwrite any file in any location on your computer including important system files and should normally be used only for the purpose of backup and restore. .IP "\fB\-e[+]\fR\fI\fR" 4 .IX Item "-e[+]" Specifies file exclude or include attributes mask. .Sp is a number in the decimal, octal (with leading '0') or hex (with leading '0x') format. .Sp By default, without '+' sign before , this switch defines the exclude mask. So if result of bitwise \s-1AND\s0 between and file attributes is nonzero, file would not be processed. .Sp If '+' sign is present, it specifies the include mask. Only those files which have at least one attribute specified in the mask will be processed. .Sp In Windows version is also possible to use symbols D, S, H, A and R instead of a digital mask to denote directories and files with system, hidden, archive and read-only attributes. The order in which the attributes are given is not significant. Unix version supports D and V symbols to define directory and device attributes. .Sp It is allowed to specify both \-e and \-e+ in the same command line. .Sp Examples: .Sp 1) archive only directory names without their contents .Sp .Vb 1 \& rar a \-r \-e+d dirs .Ve .Sp 2) do not compress system and hidden files: .Sp .Vb 1 \& rar a \-esh files .Ve .Sp 3) do not extract read-only files: .Sp .Vb 1 \& rar x \-er files .Ve .IP "\fB\-f\fR" 4 .IX Item "-f" Freshen files. May be used with archive extraction or creation. The command string \*(L"a \-f\*(R" 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. .IP "\fB\-hp\fR\fI[p]\fR" 4 .IX Item "-hp[p]" Encrypt both file data and headers. .Sp This switch is similar to \-p[p], but switch \-p encrypts only file data and leaves other information like file names visible. This switch encrypts all sensitive archive areas including file data, file names, sizes, attributes, comments and other blocks, so it provides a higher security level. Without a password it is impossible to view even the list of files in archive encrypted with \-hp. .Sp Example: .Sp .Vb 1 \& rar a \-hpfGzq5yKw secret report.txt .Ve .Sp will add the file report.txt to the encrypted archive secret.rar using the password 'fGzq5yKw' .IP "\fB\-ht[b|c]\fR" 4 .IX Item "-ht[b|c]" Select hash type [\s-1BLAKE2,CRC32\s0] for file checksum. .Sp File data integrity in \s-1RAR\s0 archive is protected by checksums calculated and stored for every archived file. .Sp By default, \fBrar\fR uses \s-1CRC32\s0 function to calculate the checksum. \&\s-1RAR 5.0\s0 archive format also allows to select BLAKE2sp hash function instead of \s-1CRC32.\s0 .Sp Specify \-htb switch for BLAKE2sp and \-htc for \s-1CRC32\s0 hash function. Since \s-1CRC32\s0 is the default algorithm, you may need \-htc only to override \&\-htb in \fBrar\fR configuration. .Sp \&\s-1CRC32\s0 output is 32 bit length. While \s-1CRC32\s0 properties are suitable to detect most of unintentional data errors, it is not reliable enough to verify file data identity. In other words, if two files have the same \&\s-1CRC32,\s0 it does not guarantee that file contents is the same. .Sp BLAKE2sp output is 256 bit. Being a cryptographically strong hash function, it practically guarantees that if two files have the same value of BLAKE2sp, their contents is the same. BLAKE2sp error detection property is also more reliable than in shorter \s-1CRC32.\s0 .Sp Since BLAKE2sp output is longer, resulting archive is slightly larger for \-htb switch. .Sp If archive headers are unencrypted (no switch \-hp), checksums for encrypted \s-1RAR 5.0\s0 files are modified using a special password dependent algorithm, to make impossible guessing file contents based on checksums. Do not expect such encrypted file checksums to match usual \&\s-1CRC32\s0 and BLAKE2sp values. .Sp This switch is supported only by \s-1RAR 5.0\s0 format, so you need to use \-ma switch with it. .Sp You can see checksums of archived files using 'vt' or 'lt' commands. .Sp Example: .Sp .Vb 1 \& rar a \-ma \-htb lists.rar *.lst .Ve .Sp will add *.lst to lists.rar using BLAKE2sp for file checksums. .IP "\fB\-id[c,d,p,q]\fR" 4 .IX Item "-id[c,d,p,q]" Disable messages. .Sp Switch \-idc disables the copyright string. .Sp Switch \-idd disables \*(L"Done\*(R" string at the end of operation. .Sp Switch \-idp disables the percentage indicator. .Sp Switch \-idq turns on the quiet mode, so only error messages and questions are displayed. .Sp It is allowed to use several modifiers at once, so switch \-idcdp is correct. .IP "\fB\-ieml[.]\fR\fI[addr]\fR" 4 .IX Item "-ieml[.][addr]" Send archive by email. Windows version only. .Sp Attach an archive created or updated by the add command to email message. You need to have a \s-1MAPI\s0 compliant email client to use this switch (most modern email programs support \s-1MAPI\s0 interface). .Sp You may enter a destination email address directly in the switch or leave it blank. In the latter case you will be asked for it by your email program. It is possible to specify several addresses separated by commas or semicolons. .Sp If you append a dot character to \-ieml, an archive will be deleted after it was successfully attached to an email. If the switch is used when creating a multivolume archive, every volume is attached to a separate email message. .IP "\fB\-ierr\fR" 4 .IX Item "-ierr" Send all messages to stderr. .IP "\fB\-ilog\fR\fI[name]\fR" 4 .IX Item "-ilog[name]" Log errors to file (registered version only). .Sp Write error messages to rar.log file. If optional 'name' parameter is not specified, the log file is created using the following defaults: .Sp Unix: \fI.rarlog\fR file in the user's home directory; .Sp Windows: \fIrar.log\fR file in \f(CW%APPDATA\fR%\eWinRAR directory. .Sp If 'name' parameter includes a file name without path, \fBrar\fR will create the log file in the default directory mentioned above using the specified name. Include both path and name to 'name' parameter if you wish to change the location of log file. .Sp By default, log file uses \s-1UTF\-16\s0 little endian encoding, but it can be changed with \-scg switch, such as \-scag for native single byte encoding. .Sp Example: .Sp .Vb 1 \& rar a \-ilogc:\elog\ebackup.log backup d:\edocs .Ve .Sp will create c:\elog\ebackup.log log file in case of errors. .IP "\fB\-inul\fR" 4 .IX Item "-inul" Disable all messages. .IP "\fB\-ioff\fR" 4 .IX Item "-ioff" Turn \s-1PC\s0 off after completing an operation. The hardware must support the power off feature. Windows version only. .IP "\fB\-isnd\fR" 4 .IX Item "-isnd" Enable sound. .IP "\fB\-k\fR" 4 .IX Item "-k" Lock archive. Any command which intends to change the archive will be ignored. .IP "\fB\-kb\fR" 4 .IX Item "-kb" Keep broken extracted files. .Sp \&\fBrar\fR, by default, deletes files with checksum errors after extraction. The switch \-kb specifies that files with checksum errors should not be deleted. .IP "\fB\-log\fR\fI[fmt][=name]\fR" 4 .IX Item "-log[fmt][=name]" Write names to log file. .Sp This switch allows to write archive and file names to specified text file in archiving, extracting, deleting and listing commands. Its behavior is defined by 'fmt' string, which can include one or more of following characters: .Sp \&\fBA\fR \- write archive names to log file. If \fBrar\fR creates or processes volumes, all volume names are logged. .Sp \&\fBF\fR \- write processed file names to log file. It includes files added to archive and extracted, deleted or listed files inside of archive. .Sp \&\fBP\fR \- if log file with specified name is exist, append data to existing file instead of creating a new one. .Sp \&\fBU\fR \- write data in Unicode format. .Sp If neither 'A' nor 'F' are specified, 'A' is assumed. .Sp \&'name' parameter allows to specify the name of log file. It must be separated from 'fmt' string by '=' character. If 'name' is not present, \&\fBrar\fR will use the default rarinfo.log file name. .Sp It is allowed to specify several \-log switches in the same command line. .Sp This switch can be particularly useful, when you need to process an archive created with \-ag or \-v switches in a batch script. You can specify \-loga=arcname.txt when creating an archive and then read an archive name generated by \fBrar\fR from arcname.txt with an appropriate command. For example, in Windows batch file it can be: set /p name=\fR" 4 .IX Item "-m" Set compression method: .Sp \&\fB\-m0\fR store do not compress file when adding to archive .Sp \&\fB\-m1\fR fastest use fastest method (less compressive) .Sp \&\fB\-m2\fR fast use fast compression method .Sp \&\fB\-m3\fR normal use normal (default) compression method .Sp \&\fB\-m4\fR good use good compression method (more compressive, but slower) .Sp \&\fB\-m5\fR best use best compression method (slightly more compressive, but slowest) .Sp If this switch is not specified, \fBrar\fR uses \-m3 method (normal compression). .IP "\fB\-ma[4|5]\fR" 4 .IX Item "-ma[4|5]" Specify a version of archiving format. .Sp By default \fBrar\fR creates archives in \s-1RAR 4\s0.x format. Use \-ma5 or just \&\-ma to create \s-1RAR 5.0\s0 archives. Use \-ma4 in case you need to override \&\-ma5 saved in configuration and force \fBrar\fR to use \s-1RAR 4\s0.x format. .Sp This switch is used only when creating a new archive. It is ignored when updating an existing archive. .IP "\fB\-mc\fR\fI\fR" 4 .IX Item "-mc" Set advanced compression parameters. .Sp This switch is intended mainly for benchmarking and experiments. In the real environment it is usually better to allow \fBrar\fR to select optimal parameters automatically. Please note that improper use of this switch may lead to very serious performance and compression loss, so use it only if you clearly understand what you do. .Sp It has the following syntax: .Sp .Vb 1 \& \-mc[param1][:param2][module][+ or \-] .Ve .Sp where is the one character field denoting a part of the compression algorithm, which has to be configured. .Sp It may have the following values: .Sp \&\fBA\fR \- audio compression; .Sp \&\fBC\fR \- true color (\s-1RGB\s0) data compression; .Sp \&\fBD\fR \- delta compression; .Sp \&\fBE\fR \- 32\-bit x86 executables compression; .Sp \&\fBI\fR \- 64\-bit Intel Itanium executables compression; .Sp \&\fBT\fR \- text compression. .Sp \&\s-1RAR 5.0\s0 archive format supports only 'D' and 'E' values. .Sp \&'+' sign at the end of switch applies the selected algorithm module to all processed data, '\-' disables the module at all. If no sign is specified, \fBrar\fR will choose modules automatically, based on data and the current compression method. .Sp Switch \-mc\- disables all optional modules and allows only the general compression algorithm. .Sp and are module dependent parameters described below. .Sp Audio compression, delta compression: .Sp is a number of byte channels (can be 1 \- 31). \fBrar\fR splits multibyte channels to bytes, for example, two 16\-bit audio channels are considered by \fBrar\fR as four channels one byte each. .Sp is ignored. .Sp 32\-bit x86 Intel executables compression, 64\-bit Intel Itanium executables compression, true color (\s-1RGB\s0) data compression: .Sp and are ignored. .Sp Text compression: .Sp Text compression algorithm provides noticeably higher compression on plain text data. But it cannot utilize several \s-1CPU\s0 cores efficiently resulting in slower compression time comparing to general algorithm in multicore and multiprocessor environment. Also its decompression speed is much slower than in general algorithm regardless of \s-1CPU\s0 cores number. This is why the text compression is disabled by default. You can specify \-mct switch to allow \s-1RAR\s0 to select this algorithm automatically for suitable data. Switch \-mct+ will force use of the text compression for all data. .Sp Switch \-mct can also include and , so its full syntax is \-mc[param1][:param2]t[+ or \-]. .Sp is the order of \s-1PPM\s0 algorithm (can be 2 \- 63). Usually a higher value slightly increases the compression ratio of redundant data, but only if enough memory is available to \s-1PPM.\s0 In case of lack of memory the result may be negative. Higher order values decrease both compression and decompression speed. .Sp is memory in megabytes allocated for \s-1PPM \s0(1\-128). Higher values may increase the compression ratio, but note that \s-1PPM\s0 uses the equal memory size both to compress and decompress, so if you allocate too much memory when creating an archive, other people may have problems when decompressing it on a computer with less memory installed. Decompression will be still possible using virtual memory, but it may become very slow. .Sp Examples: .Sp 1) switch \-mc1a+ forces use of 8\-bit mono audio compression for all data. .Sp 2) switch \-mc10:40t+ forces use of text compression algorithm for all data, sets the compression order to 10 and allocates 40 \s-1MB\s0 memory. .Sp 3) switch \-mc12t sets the text compression order to 12, when the text compression is used, but leaves to \s-1RAR\s0 to decide when to use it. .Sp 4) switches \-mct \-mcd\- allow \s-1RAR\s0 to apply the text compression to suitable data and disable the delta compression. .IP "\fB\-md\fR\fI\fR\fB[k,m,g]\fR" 4 .IX Item "-md[k,m,g]" Select the dictionary size. .Sp Sliding dictionary is the memory area used by compression algorithm to find and compress repeated data patterns. If size of file being compressed (or total files size in case of solid archive) is larger than dictionary size, increasing the dictionary is likely to increase the compression ratio, reduce the archiving speed and increase memory requirements. .Sp For \s-1RAR 4\s0.x archive format the dictionary size can be: 64 \s-1KB, 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB.\s0 .Sp For \s-1RAR 5.0\s0 archive format the dictionary size can be: 128 \s-1KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB, 8 MB, 16 MB, 32 MB, 64 MB, 128 MB, 256 MB, 512 MB, 1 GB.\s0 .Sp You can use 'k', 'm' and 'g' modifiers to specify the size in kilo\-, mega\- and gigabytes, like \-md64m for 64 \s-1MB\s0 dictionary. If no modifier is specified, megabytes are assumed, so \-md64m and \-md64 are equal. .Sp When archiving, \fBrar\fR needs about 6x memory of specified dictionary size, so 512 \s-1MB\s0 and 1 \s-1GB\s0 sizes are available in 64 bit \fBrar\fR version only. When extracting, slightly more than a single dictionary size is allocated, so both 32 and 64 bit versions can unpack archives with all dictionaries up to and including 1 \s-1GB.\s0 .Sp \&\fBrar\fR can reduce the dictionary size if it is significantly larger than source data size. It helps to reduce memory requirements without decreasing compression. .Sp Default sliding dictionary size is 4 \s-1MB\s0 for \s-1RAR 4\s0.x and 32 \s-1MB\s0 for \s-1RAR 5.0\s0 archive format. .Sp Example: .Sp .Vb 1 \& rar a \-s \-ma \-md128 lib *.dll .Ve .Sp create a solid archive in \s-1RAR 5.0\s0 format with 128 \s-1MB\s0 dictionary. .IP "\fB\-ms\fR\fI[list]\fR" 4 .IX Item "-ms[list]" Specify file types to store. .Sp Specify file types, which will be stored without compression. This switch may be used to store already compressed files, which helps to increase archiving speed without noticeable loss in the compression ratio. .Sp Optional parameter defines the list of file extensions separated by semicolons. For example, \-msrar;zip;jpg will force \fBrar\fR to store without compression all \s-1RAR\s0 and \s-1ZIP\s0 archives and \s-1JPG\s0 images. It is also allowed to specify wildcard file masks in the list, so \-ms*.rar;*.zip;*.jpg will work too. Several \-ms switches are permitted, such as \-msrar \-mszip instead of \-msrar;zip. .Sp In Unix \-ms switch containing several file types needs to be enclosed in quote marks. It protects semicolons from processing by Unix shell. Another solution is to use individual \-ms switches for every file type. .Sp If is not specified, \-ms switch will use the default set of extensions, which includes the following file types: .Sp 7z, ace, arj, bz2, cab, gz, jpeg, jpg, lha, lzh, mp3, rar, taz, tgz, xz, z, zip .IP "\fB\-mt\fR\fI\fR" 4 .IX Item "-mt" Set the number of threads. .Sp parameter can take values from 1 to 32. It defines the recommended maximum number of active threads for compression algorithm also as for other \fBrar\fR modules, which can start several threads. While \&\fBrar\fR attempts to follow this recommendation, sometimes the real number of active threads can exceed the specified value. .Sp Change of parameter slightly affects the compression ratio, so archives created with different \-mt switches will not be exactly the same even if all other compression settings are equal. .Sp If \-mt switch is not specified, \fBrar\fR will try to detect the number of available processors and select the optimal number of threads automatically. .IP "\fB\-n\fR\fI\fR" 4 .IX Item "-n" Additionally filter included files. .Sp Apply the mask as an additional filter to included file list. Wildcards can be used both in the name and file parts of file mask. You can specify the switch '\-n' several times. .Sp This switch does not replace usual file masks, which still need to be entered in the command line. It is an additional filter limiting processed files only to those matching the include mask specified in \-n switch. It can help to reduce the command line length sometimes. .Sp For example, if you need to compress all *.txt and *.lst files in directories Project and Info, you can enter: .Sp .Vb 1 \& rar a \-r text Project\e*.txt Project\e*.lst Info\e*.txt Info\e*.lst .Ve .Sp or using the switch \-n: .Sp .Vb 1 \& rar a \-r \-n*.txt \-n*.lst text Project Info .Ve .IP "\fB\-n\fR\fI@\fR" 4 .IX Item "-n@" Read additional filter masks from list file. .Sp Similar to \-n switch, but reads filter masks from the list file. If you use \-n@ without the list file name parameter, it will read filter masks from stdin. .Sp Example: .Sp .Vb 1 \& rar a \-r \-n@inclist.txt text Project Info .Ve .IP "\fB\-oc\fR" 4 .IX Item "-oc" Set \s-1NTFS\s0 Compressed attribute. Windows version only. .Sp This switch allows to restore \s-1NTFS\s0 Compressed attribute when extracting files. \fBrar\fR saves Compressed file attributes when creating an archive, but does not restore them unless \-oc switch is specified. .IP "\fB\-oh\fR" 4 .IX Item "-oh" Save hard links as the link instead of the file. .Sp If archiving files include several hard links, store the first archived hard link as usual file and the rest of hard links in the same set as links to this first file. When extracting such files, \fBrar\fR will create hard links instead of usual files. .Sp You must not delete or rename the first hard link in archive after the archive was created, because it will make extraction of following links impossible. If you modify the first link, all following links will also have the modified contents after extracting. Extraction command must involve the first hard link to create following hard links successfully. .Sp This switch is supported only by \s-1RAR 5.0\s0 format, so you need to use \-ma switch with it. .IP "\fB\-oi\fR\fI[0\-4][:]\fR" 4 .IX Item "-oi[0-4][:]" Save identical files as references. .Sp Switch \-oi0 (or just \-oi\-) turns off identical file processing, so such files are compressed as usual files. It can be used to override another \&\-oi value stored in \fBrar\fR configuration. .Sp If \-oi1 (or just \-oi) is specified, \fBrar\fR analyzes the file contents before starting archiving. If several identical files are found, the first file in the set is saved as usual file and all following files are saved as references to this first file. It allows to reduce the archive size, but applies some restrictions to resulting archive. You must not delete or rename the first identical file in archive after the archive was created, because it will make extraction of following files using it as a reference impossible. If you modify the first file, following files will also have the modified contents after extracting. Extraction command must involve the first file to create following files successfully. .Sp It is recommended to use \-oi only if you compress a lot of identical files, will not modify an archive later and will extract an archive entirely, without necessity to unpack or skip individual files. If all identical files are small enough to fit into compression dictionary specified with \-md switch, switch \-s can provide more flexible solution than \-oi. .Sp Switch \-oi2 is similar to \-oi1, with the only difference: it will display names of found identical files before starting archiving. .Sp Switches \-oi3 and \-oi4 allow to utilize \fBrar\fR to generate lists of identical files. Though you still need to provide a dummy archive name to make the command syntax valid, in this mode an archive is not created and nothing is compressed. If \-oi3 is used, file sizes and names are displayed and every identical file group is separated with empty line. Switch \-oi4 displays bare file names and skips the first identical file in every file group, so only duplicates are listed. .Sp Optional value allows to define the minimum file size threshold. Files smaller than are not analyzed and not considered as identical. If this parameter is not present, it is assumed to be 64 \s-1KB\s0 by default. Selecting too small may increase the time required to detect identical files. .Sp Switches \-oi1 and \-oi2 are supported only by \s-1RAR 5.0\s0 format, so you need to use \-ma switch with it. .Sp Examples: .Sp .Vb 1 \& rar a \-oi \-ma archive .Ve .Sp Save contents of current directory to archive.rar. Store identical files as references. .Sp .Vb 1 \& rar a \-oi3:1000000 \-r dummy c:\ephoto\e*.jpg .Ve .Sp List all duplicate *.jpg files lather than 1000000 bytes found in c:\ephoto and its subdirectories. .IP "\fB\-ol\fR" 4 .IX Item "-ol" Save symbolic links as the link instead of the file. .Sp Save symbolic links as links, so file contents is not archived. In Windows version it also saves reparse points as links. Such archive entries are restored as symbolic links or reparse points when extracting. .Sp Supported both for \s-1RAR 4\s0.x and \s-1RAR 5.0\s0 archives in \fBrar\fR for Unix and only for \s-1RAR 5.0\s0 archives in \fBrar\fR for Windows. .Sp In Windows you may need to run \fBrar\fR as administrator to create symbolic links when extracting. .IP "\fB\-or\fR" 4 .IX Item "-or" Rename extracted files automatically if file with the same name already exists. Renamed file will get the name like 'filename(N).txt', where \&'filename.txt' is the original file name and 'N' is a number starting from 1 and incrementing if file exists. .IP "\fB\-os\fR" 4 .IX Item "-os" Save \s-1NTFS\s0 streams. Windows version only. .Sp This switch has meaning only for \s-1NTFS\s0 file system and allows to save alternative data streams associated with a file. You may need to specify it when archiving if you use software storing data in alternative streams and wish to preserve these streams. .Sp Streams are not saved for \s-1NTFS\s0 encrypted files. .IP "\fB\-ow\fR" 4 .IX Item "-ow" Use this switch when archiving to save file security information and when extracting to restore it. .Sp Unix \fBrar\fR version saves file owner and group when using this switch. .Sp Windows version stores owner, group, file permissions and audit information, but only if you have necessary privileges to read them. Note that only \s-1NTFS\s0 file system supports file based security under Windows. .IP "\fB\-o[+|\-]\fR" 4 .IX Item "-o[+|-]" Set the overwrite mode. Can be used both when extracting and updating archived files. Following modes are available: .Sp \&\fB\-o\fR Ask before overwrite (default for extracting files); .Sp \&\fB\-o+\fR Overwrite all (default for updating archived files); .Sp \&\fB\-o\-\fR Skip existing files. .IP "\fB\-p\fR\fI[p]\fR" 4 .IX Item "-p[p]" Encrypt files with the string

as password while archiving. The password is case-sensitive. If you omit the password on the command line, you will be prompted with message \*(L"Enter password\*(R". .Sp Example: .Sp .Vb 1 \& rar a \-pmyhoney secret1 *.txt .Ve .Sp add files *.txt and encrypt them with password \*(L"myhoney\*(R". .IP "\fB\-p\-\fR" 4 .IX Item "-p-" Do not query password .Sp Do not query password for encrypted files when extracting. Actually you can specify any invalid password to suppress the password prompt and force \fBrar\fR to issue 'incorrect password' message when extracting an encrypted file. This switch just sets '\-' as a password. .IP "\fB\-qo[\-|+]\fR" 4 .IX Item "-qo[-|+]" Add quick open information [none|force] .Sp \&\s-1RAR\s0 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. .Sp To improve archive open speed and still not make the entire archive dependent on a single damaged block, \s-1RAR 5.0\s0 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 \fBrar\fR detects that quick open information is damaged, it resorts to reading individual headers from inside of archive, so damage resistance is not lessened. .Sp 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, \fBrar\fR 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 \s-1RAR\s0 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. .Sp 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. .IP "\fB\-r\fR" 4 .IX Item "-r" Recurse subdirectories. May be used with commands: a, u, f, m, x, e, t, p, v, l, c, cf and s. .Sp When used with the commands 'a', 'u', 'f', 'm' will process files in all sub-directories as well as the current working directory. .Sp 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. .IP "\fB\-r\-\fR" 4 .IX Item "-r-" Disable recursion. .Sp Even without \-r switch \fBrar\fR can enable the recursion automatically in some situations. Switch \-r\- prohibits it. .Sp If you specify a directory name when archiving and if such name does not include wildcards, by default \fBrar\fR adds the directory contents even if switch \-r is not specified. Also \fBrar\fR automatically enables the recursion if disk root without wildcards is specified as a file mask. Switch \-r\- disables such behavior. .Sp For example: .Sp .Vb 1 \& rar a \-r\- arc dirname .Ve .Sp command will add only the empty 'dirname' directory and ignore its contents. Following command: .Sp .Vb 1 \& rar a \-r\- arc c:\e .Ve .Sp will compress contents of root c: directory only and will not recurse into subdirectories. .IP "\fB\-r0\fR" 4 .IX Item "-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 '?'. .Sp 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. .Sp Example: .Sp .Vb 1 \& rar a \-r0 docs.rar *.doc readme.txt .Ve .Sp 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, \fBrar\fR would search for readme.txt in subdirectories too. .IP "\fB\-ri\fR\fI

[:]\fR" 4 .IX Item "-ri

[:]" Set priority and sleep time. Available only in \fBrar\fR for Windows. This switch regulates system load by \fBrar\fR in multitasking environment. Possible task priority

values are 0 \- 15. .Sp If

is 0, \fBrar\fR uses the default task priority.

equal to 1 sets the lowest possible priority, 15 \- the highest possible. .Sp Sleep time is a value from 0 to 1000 (milliseconds). This is a period of time that \fBrar\fR 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. .Sp Example: .Sp execute \fBrar\fR with default priority and 10 ms sleep time: .Sp .Vb 1 \& rar a \-ri0:10 backup *.* .Ve .IP "\fB\-rr\fR\fI[N]\fR" 4 .IX Item "-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. .IP "\fB\-rv\fR\fI[N]\fR" 4 .IX Item "-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. .IP "\fB\-s\fR" 4 .IX Item "-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. .Sp 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. .Sp 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, \fIrarfiles.lst\fR. .Sp Example: .Sp create solid archive sources.rar with 512 \s-1KB\s0 dictionary, recursing all directories, starting with the current directory. Add only .asm files: .Sp .Vb 1 \& rar a \-s \-md512 sources.rar *.asm \-r .Ve .IP "\fB\-s\fR\fIN\fR" 4 .IX Item "-sN" Create solid groups using file count .Sp Similar to \-s, but resets solid statistics after compressing files. Usually decreases compression, but also decreases losses in case of solid archive damages. .IP "\fB\-sc\fR\fI[objects]\fR" 4 .IX Item "-sc[objects]" Specify the character set for list files, log files and archive comment files. .Sp \&'Charset' parameter is mandatory and can have one of the following values: .Sp \&\fBU\fR \- Unicode; .Sp \&\fBA\fR \- the native single byte encoding, which is \s-1ANSI\s0 for Windows version; .Sp \&\fBO\fR \- \s-1OEM \s0(\s-1DOS\s0) encoding. Windows version only. .Sp Files in Unicode format must have \s-1FFFE\s0 or \s-1FEFF\s0 Unicode character in the beginning, otherwise \fBrar\fR will ignore this switch and process the file as \s-1ASCII\s0 text. .Sp \&'Objects' parameter is optional and can have one of the following values: .Sp \&\fBG\fR \- log files produced by \-ilog switch; .Sp \&\fBL\fR \- list files; .Sp \&\fBC\fR \- comment files. .Sp It is allowed to specify more than one object, for example, \-scolc. If \&'objects' parameter is missing, 'charset' is applied to all objects. .Sp This switch allows to specify the character set for files in \-z[file] switch, list files and comment files written by \*(L"cw\*(R" command. .Sp Examples: .Sp .Vb 1 \& rar a \-scol data @list .Ve .Sp Read names contained in 'list' using \s-1OEM\s0 encoding. .Sp .Vb 1 \& rar c \-scuc \-zcomment.txt data .Ve .Sp Read comment.txt as Unicode file. .Sp .Vb 1 \& rar cw \-scuc data comment.txt .Ve .Sp Write comment.txt as Unicode file. .IP "\fB\-se\fR" 4 .IX Item "-se" Create solid groups using extension .Sp Similar to \-s, but resets solid statistics if file extension is changed. Usually decreases compression, but also decreases losses from solid archive damages. .IP "\fB\-sfx\fR\fI[name]\fR" 4 .IX Item "-sfx[name]" Create \s-1SFX\s0 archives. If this switch is used when creating a new archive, a Self-Extracting archive (using a module in file \fIdefault.sfx\fR or specified in the switch) would be created. In the Windows version \&\fIdefault.sfx\fR 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. .Sp Example: .Sp .Vb 1 \& rar a \-sfxwincon.sfx myinst .Ve .Sp create SelF-eXtracting (\s-1SFX\s0) archive using wincon.sfx SFX-module. .IP "\fB\-si\fR\fI[name]\fR" 4 .IX Item "-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. .Sp Example: .Sp .Vb 1 \& type Tree.Far | rar a \-siTree.Far tree.rar .Ve .Sp will compress 'type Tree.Far' output as 'Tree.Far' file. .IP "\fB\-sl\fR\fI\fR" 4 .IX Item "-sl" Process only those files, which size is less than specified in parameter of this switch. Parameter must be specified in bytes. .IP "\fB\-sm\fR\fI\fR" 4 .IX Item "-sm" Process only those files, which size is more than specified in parameter of this switch. Parameter must be specified in bytes. .IP "\fB\-sv\fR" 4 .IX Item "-sv" Create independent solid volumes .Sp By default \fBrar\fR 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). .Sp This switch forces \fBrar\fR 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. .Sp Note that sometimes \fBrar\fR cannot reset statistics even using this switch. For example, it cannot be done when compressing one large file split between several volumes. \fBrar\fR is able to reset solid statistics only between separate files, but not inside of single file. .Sp Ignored if used when creating a non-volume archive. .IP "\fB\-sv\-\fR" 4 .IX Item "-sv-" Create dependent solid volumes .Sp Disables to reset solid statistics between volumes. .Sp 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. .Sp Ignored if used when creating a non-volume archive. .IP "\fB\-s\-\fR" 4 .IX Item "-s-" Disable solid archiving .IP "\fB\-t\fR" 4 .IX Item "-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. .IP "\fB\-ta\fR\fI\fR" 4 .IX Item "-ta" Process only files modified after the specified date. .Sp Format of the date string is \s-1YYYYMMDDHHMMSS. \s0 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 \&\*(L"files modified after 0 hour 0 minutes 0 seconds of 20 November 2001\*(R". .IP "\fB\-tb\fR\fI\fR" 4 .IX Item "-tb" Process only files modified before the specified date. Format of the switch is the same as \-ta. .IP "\fB\-tk\fR" 4 .IX Item "-tk" Keep original archive date. Prevents \s-1RAR\s0 from modifying the archive date when changing an archive. .IP "\fB\-tl\fR" 4 .IX Item "-tl" Set archive time to newest file. Forces \s-1RAR\s0 to set the date of a changed archive to the date of the newest file in the archive. .IP "\fB\-tn\fR\fI

\fR" 4 .IX Item "-w

" Assign work directory as

. This switch may be used to assign the directory for temporary files. .IP "\fB\-x\fR\fI\fR" 4 .IX Item "-x" Exclude the specified file or directory. Wildcards can be used in both the name and path parts of file mask. You can specify the switch '\-x' several times to define several exclusion masks in the same command line. .Sp If mask contains wildcards, it applies to files in current directory and its subdirectories. It is not recursive without wildcards, so \*(L"filename\*(R" mask will exclude 'filename' file only in current directory when archiving or in root archive directory when extracting. .Sp Use \*(L"*\efilename\*(R" syntax to exclude \*(L"filename\*(R" recursively in all directories. .Sp If you know the exact path to file, you can use \*(L"path\efilename\*(R" syntax to exclude only this copy of \*(L"filename\*(R". If you use \-xpath\efilename syntax when unpacking an archive, \*(L"path\*(R" must be the path inside of archive, not the file path on the disk after unpacking. .Sp By default, masks containing wildcards are applied only to files. If you need a mask with wildcards to exclude several directories, use the special syntax for directory exclusion masks. Such masks must have the trailing path separator character ('\e' for Windows and '/' for Unix). For example, \*(L"*tmp*\e\*(R" mask will exclude all directories matching \&\*(L"*tmp*\*(R" and \*(L"*\etmp\e\*(R" will exclude all 'tmp' directories. Since wildcards are present, both masks will be applied to contents of current directory and all its subdirectories. .Sp If you wish to exclude only one directory, specify the exact name of directory including the absolute or relative path without any wildcards. In this case you do not need to append the path separator to mask, which is required only for directory exclusion masks containing wildcards to distinguish them from file exclusion masks. .Sp Examples: .Sp .Vb 1 \& rar a \-r \-x*.jpg \-x*.avi rawfiles .Ve .Sp compress all files except *.jpg and *.avi in current directory and its subdirectories; .Sp .Vb 1 \& rar a \-r \-x*\etemp\e savec c:\e* .Ve .Sp compress all files on the disk c: except 'temp' directories and files inside of 'temp' directories; .Sp .Vb 1 \& rar x \-x*.txt docs .Ve .Sp extract all files except *.txt from docs.rar. .IP "\fB\-x\fR\fI@\fR" 4 .IX Item "-x@" Exclude files listed in the specified list file. If you use \-x@ without the list file name parameter, it will read file names from stdin. .Sp Example: .Sp .Vb 1 \& rar a \-x@exlist.txt arch *.exe .Ve .IP "\fB\-y\fR" 4 .IX Item "-y" Assume Yes on all queries. .IP "\fB\-z\fR\fI[f]\fR" 4 .IX Item "-z[f]" Read archive comment from file . Use with \-sc switch if you need to specify the character set for comment text file. If is not specified, comment is read from stdin. .SH "LIMITATIONS" .IX Header "LIMITATIONS" Command limitations: .PP Commands 'd','u','f','c','cf' will not operate with archive volumes. .PP Command 'a' cannot be used to update an archive volume, only to create a new one. .SH "CONFIGURATION FILE" .IX Header "CONFIGURATION FILE" \&\fBrar\fR for Unix reads configuration information from the file \fI.rarrc\fR in the user's home directory (stored in \s-1HOME\s0 environment variable) or in /etc directory. .PP \&\fBrar\fR for Windows reads configuration information from the file \&\fIrar.ini\fR, placed in the same directory as the rar.exe file. .PP This file may contain the following string: .PP switches=any \fBrar\fR switches, separated by spaces .PP For example: .PP .Vb 1 \& switches=\-m5 \-s .Ve .SH "ENVIRONMENT VARIABLE" .IX Header "ENVIRONMENT VARIABLE" Default parameters may be added to the \fBrar\fR command line by establishing an environment variable \*(L"\s-1RAR\*(R".\s0 .PP For instance, in Unix following lines may be added to your profile: .PP .Vb 2 \& RAR=\*(Aq\-s \-md1024\*(Aq \& export RAR .Ve .PP \&\fBrar\fR will use this string as default parameters in the command line and will create \*(L"solid\*(R" archives with 1024 \s-1KB\s0 sliding dictionary size. .PP \&\fBrar\fR handles options with priority as following: .PP command line switches highest priority .PP switches in the \s-1RAR\s0 variable lower priority .PP switches saved in configuration file lowest priority .SH "LOG FILE" .IX Header "LOG FILE" If the switch \-ilog is specified in the command line or configuration file, \fBrar\fR will write informational messages, concerning errors encountered while processing archives, into a log file. Read switch \&\-ilog description for more details. .SH "THE FILE ORDER LIST FOR SOLID ARCHIVING \- RARFILES.LST" .IX Header "THE FILE ORDER LIST FOR SOLID ARCHIVING - RARFILES.LST" \&\fIrarfiles.lst\fR contains a user-defined file list, which tells \fBrar\fR the order in which to add files to a solid archive. It may contain file names, wildcards and special entry \- \f(CW$default\fR. The default entry defines the place in order list for files not matched with other entries in this file. The comment character is ';'. .PP In Windows this file should be placed in the same directory as \fBrar\fR or in \f(CW%APPDATA\fR%\eWinRAR directory, in Unix \- to the user's home directory or in /etc. .PP Tips to provide improved compression and speed of operation: .PP \&\- similar files should be grouped together in the archive; .PP \&\- frequently accessed files should be placed at the beginning. .PP Normally masks placed nearer to the top of list have a higher priority, but there is an exception from this rule. If \fIrarfiles.lst\fR contains such two masks that all files matched by one mask are also matched by another, that mask which matches a smaller subset of file names will have higher priority regardless of its position in the list. For example, if you have *.cpp and f*.cpp masks, f*.cpp has a higher priority, so the position of \&'filename.cpp' will be chosen according to 'f*.cpp', not '*.cpp'. .SH "EXIT VALUES" .IX Header "EXIT VALUES" \&\s-1RAR\s0 exits with a zero code (0) in case of successful operation. Non-zero exit code indicates some kind of error: .PP Code Description .PP 0 Successful operation. .PP 1 Non fatal error(s) occurred. .PP 2 A fatal error occurred. .PP 3 Invalid checksum. Data is damaged. .PP 4 Attempt to modify an archive locked by 'k' command. .PP 5 Write error. .PP 6 File open error. .PP 7 Wrong command line option. .PP 8 Not enough memory. .PP 9 File create error. .PP 10 No files matching the specified mask and options were found. .PP 11 Wrong password. .PP 255 User stopped the process. .SH "GLOSSARY" .IX Header "GLOSSARY" .IP "\fBArchive\fR" 4 .IX Item "Archive" Special file containing one or more files optionally compressed and/or encrypted. .IP "\fBCompression\fR" 4 .IX Item "Compression" A method of encoding data to reduce it's size. .IP "\fBChecksum\fR" 4 .IX Item "Checksum" Value calculating for data block or file and allowing to check data or file validity. .IP "\fB\s-1SFX\s0 archive\fR" 4 .IX Item "SFX archive" SelF-eXtracting archive. Archive in executable format, consisting of self-extracting module followed by compressed data. It is enough to run such executable to start extraction. .IP "\fBSolid\fR" 4 .IX Item "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. .IP "\fBVolume\fR" 4 .IX Item "Volume" Part of a split archive. Splitting an archive to volumes allows storing them on several removable disks. Solid volumes must be extracted starting from first volume in sequence. .SH "COPYRIGHTS" .IX Header "COPYRIGHTS" (c) 1993\-2013 Alexander Roshal