updated on Tue Jan 17 20:03:13 UTC 2012
[aur-mirror.git] / rar / rar.1
blob141f1fd7464e8f318200b74feb652f88b8f08e1d
1 .TH "rar" "1" "2 Mar 2011" "TuxSpirit" "Compression utility"
2 .SH "NAME"
3 rar \- Compression  utilty
4 .SH "SYNTAX"
5 \fBrar\fR <\fBcommand\fR>  [ \-<\fIswitches\fR> ]  <\fBarchive\fR>  [ <\fI@listfiles...\fR> ]
6     [ <\fBfiles...\fR> ]  [ <\fBpath_to_extract\\\fR> ]
7 .SH "DESCRIPTION"
8 Command line options (commands and switches) provide control of creating and managing archives with RAR. The command is a string (or a single letter) which commands RAR to perform a corresponding action.Switches are designed to modify the way RAR performs the action. Other parameters are archive name and files to be archived into or extracted from the archive.
10 Listfiles 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 // characters. For example,you may create backup.lst containing the following strings:
12     /home/username/doc/*.txt        //backup text documents
13     /home/username/pictures/*.bmp   //backup pictures
14     /home/username/misc
16 and then run:
18      rar a backup @backup.lst
20 If you wish to read file names from stdin (standard input), specify the empty listfile name (just @).
22 By default, Windows console RAR uses OEM (DOS) encoding in list files.
23 but it can be redefined with \-sc<charset>l switch.
25 You may specify both usual file names and list files in the same command line. If neither files nor listfiles are specified, then *.* is implied and RAR will process all files
27 In Unix you need to enclose RAR command line parameters containing wildcards in single or double quotes to prevent their expansion from all *.rar archives in current directory :
29      rar e '*.rar' '*.asm'
31 .SH "COMMAND"
32 \fBa\fR      Add files to archive.
33 .TP 
34 .LP 
35 \fIExamples\fR:
37 1) add all *.hlp files from the current directory to the archive
38 .br 
39    help.rar:
40 .br 
42    rar a help *.hlp
43 .br 
45 2) archive all files from the current directory and subdirecto\-
46 .br 
47    ries to 362000 bytes size solid, self\-extracting volumes and
48 .br 
49    add the recovery record to each volume:
50 .br 
52    rar a \-r \-v362 \-s \-sfx \-rr save
53 .br 
55    Because no file names are specified, all files (*) are
56 .br 
57    assumed.
58 .br 
60 3) as a special exception, if directory name is specified as an 
61 .br 
62    argument and if directory name does not include file masks 
63 .br 
64    and trailing backslashes, the entire contents of the directo\-
65 .br 
66    ry and all subdirectories will be added to the archive even
67 .br 
68    if switch \-r is not specified.
69 .br 
71    The following command will add all files from the directory
72 .br 
73    Bitmaps and its subdirectories to the RAR archive Pictures
74 .br 
75    .rar :
76 .br 
77             
78    rar a Pictures.rar Bitmaps
79 .br 
81 4) if directory name includes file masks or trailing backsla\-
82 .br 
83    shes, normal rules apply and you need to specify switch \-r 
84 .br 
85    to process its subdirectories. 
86 .br 
88    The following command will add all files from directory Bit\-
89 .br 
90    maps, but not from its subdirectories, because switch \-r is
91 .br 
92    not specified:
93 .br 
95    rar a Pictures.rar Bitmaps\\*
96 .TP 
97 .RP 
98 .br 
101 \fBc\fR      Add archive comment. Comments are displayed while the archive is
102 .br 
103 being processed. Comment length is limited to 62000 bytes
104 .TP 
105 .LP 
106 \fIExamples\fR:
107 .br 
109    rar c distrib.rar
110 .br 
112 Also comments may be added from a file using \-z[file] switch.
113 .br 
114 The following command adds a comment from info.txt file:
115 .br 
117    rar c \-zinfo.txt dummy
118 .TP 
119 .RP 
120 .br 
123 \fBcf\fR     Add files comment. File comments are displayed when the 'v'
124 .br 
125 command is given. File comment length is limited to 32767 bytes.
126 .TP 
127 .LP 
128 \fIExample\fR:
129 .br 
131    rar cf bigarch *.txt
132 .TP 
133 .RP 
134 .br 
137 \fBch\fR     Change archive parameters.
138 .br 
140 This command can be used with most of archive modification switches to modify
141 archive parameters. It is especially convenient for switches like \-av, \-cl, \-cu, \-tl, which do not have a dedicated command.
142 .TP 
143 .LP 
144 \fIExample\fR:
145 .br 
147 Set archive time to latest file:
149    rar ch \-tl files.rar
150 .TP 
151 .RP 
152 .br 
155 \fBcw\fR     Write archive comment to specified file.
156 .br 
158 Format of output file depends on \-sc switch.
159 .br 
161 If output file name is not specified, comment data will be sent to stdout.
162 .TP 
163 .LP 
164 \fIExamples\fR:
165 .br 
167 1) rar cw arc comment.txt
168 .br 
170 2) rar cw \-scuc arc unicode.txt
171 .br 
173 3) rar cw arc
174 .TP 
175 .RP 
176 .br 
179 \fBd\fR      Delete files from archive. Please note if the processing of this
180 .br 
181 command results in removing all the files from the archive, the empty archive would removed.
182 .TP 
183 .RP 
184 .br 
187 \fBe\fR      Extract files to current directory.
188 .TP 
189 .RP 
190 .br 
193 \fBf\fR      Freshen files in archive. Updates those files changed since they
194 .br 
195 were packed to the archive. This command will not add new files to the archive.
196 .TP 
197 .RP 
198 .br 
201 \fBi[i|c|h|t]=<string>\fR      
202 .br 
203 Find string in archives
204 .br 
206 Supports following optional parameters:
207 .br 
209    i \- case insensitive search (default);
210 .br 
212    c \- case sensitive search;
213 .br 
215    h \- hexadecimal search;
216 .br 
218    t \- use ANSI, Unicode and OEM character tables (Windows only);
219 .br 
221 If no parameters are specified, it is possible to use the simplified command syntax i<string> instead of i=<string>
222 .br 
224 It is allowed to specify 't' modifier with other parameters, for example, ict=string performs case sensitive search using all mentioned above character tables.
225 .TP 
226 .LP 
227 \fIExamples\fR:
228 .br 
230 1) rar "ic=first level" \-r c:\\*.rar *.txt
232 .br 
233    Perform case sensitive search of "first level" string in 
234 .br 
235    *.txt files in *.rar archives on the disk c:
236 .br 
238 2) rar ih=f0e0aeaeab2d83e3a9 \-r e:\texts
239 .br 
241    Search for hex string f0 e0 ae ae ab 2d 83 e3 a9
242 .br 
243    in rar archives in e:\texts directory.
244 .TP 
245 .RP 
246 .br 
249 \fBk\fR      Lock archive. Any command which intends to change the archive
250 .br 
251 will be ignored.
252 .TP 
253 .LP 
254 \fIExample\fR:
255 .br 
257 rar k final.rar
258 .TP 
259 .RP 
260 .br 
263 \fBl[t,b]\fR List contents of archive [technical]. Files are listed as with
264 .br 
265 the 'v' command with the exception of the file path. i.e. only the file name is displayed. Optional technical information (host OS, solid flag and old version flag) is displayed when 't' modifier is used. Modifier 'b' forces RAR to output only bare file names without any additional information.
266 .TP 
267 .RP 
268 .br 
271 \fBm[f]\fR   Move to archive [files only]. Moving files and directories
272 .br 
273 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
274 .TP 
275 .RP 
276 .br 
279 \fBp\fR      Print file to stdout.
280 .br 
282 You may use this command together with \-inul switch to disable all RAR messages and print only file data. It may be important when you need to send a file to stdout for use in pipes.
283 .TP 
284 .RP 
285 .br 
288 \fBr\fR      Repair archive. Archive repairing is performed in two stages.
289 .br 
290 First, the damaged archive is searched for a recovery record (see 'rr' command). If the archive contains a recovery record and if the portion of the damaged data is continuous and less than N*512 bytes, where N is number of recovery sectors placed into the archive, the chance of successful archive reconstruction is very high. When this stage has been completed, a new archive will be created, called fixed.arcname.rar, where 'arcname' is the original (damaged) archive name.
291 .br 
293 If a broken archive does not contain a recovery record or if the archive is not completely recovered due to major damage, a second stage is performed. During this stage only the archive structure is reconstructed and it is impossible to recover files which fail the CRC validation, it is still possible, 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.
294 .br 
296 When the second stage is completed, the reconstructed archive will be saved as rebuilt.arcname.rar, where 'arcname' is the original archive name.
297 .br 
299 While the recovery is in progress, RAR may prompt the user for assistance when a suspicious file is detected.
300 .br 
302                       Suspicious entry
303 .br 
305               Name:  <possibly filename>
306 .br 
307               Size:  <size>    Packed: <compressed size>
308 .br 
310                       Add it: Yes/No/All
311 .br 
313 Answer 'y' to add this entry to the file rebuilt.arcname.rar.
314 .TP 
315 .LP 
316 \fIExample\fR:
317 .br 
319 rar r buggy.rar
320 .TP 
321 .RP 
322 .br 
325 \fBrc\fR     Reconstruct missing and damaged volumes using recovery volumes
326 .br 
327 (.rev files). You need to specify any existing volume as the archive name, for example, 'rar rc backup.part03.rar'
328 .br 
330 Read 'rv' command description for information about recovery volumes.
331 .TP 
332 .RP 
333 .br 
336 \fBrn\fR     Rename archived files.
337 .br 
339 The command syntax is:
340 .br 
342 rar rn <arcname> <srcname1> <destname1>...<srcnameN> <destnameN>
343 .br 
345 For example, the following command:
346 .br 
348 rar rn data.rar readme.txt readme.bak info.txt info.bak
349 .br 
351 will rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar.
352 .br 
354 It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. For example:
355 .br 
357 rar rn data.rar *.txt *.bak
358 .br 
360 will rename all *.txt files to *.bak.
361 .br 
363 RAR 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.
364 .TP 
365 .RP 
366 .br 
369 \fBrr[N]\fR  Add data recovery record. Optionally, redundant information
370 .br 
371 (recovery record) may be added to an archive. This will cause a small increase of the archive size and helps to recover archived files in case of floppy disk failure or data losses of any other kind, provided that damage is not too severe.
372 .br 
374 A recovery record contains up to 524288 recovery sectors. The number of sectors may be specified directly in the 'rr' command (N = 1, 2 .. 524288) or, if it is not specified by the user, it will be selected automatically according to the archive size: a size of the recovery information will be about 1% of the total archive size, usually allowing the recovery of up to 0.6% of the total archive size of continuously damaged data.
375 .br 
377 It is also possible to specify the recovery record size in percent to the archive size. Just append the percent character to the command parameter. For example:
378 .br 
380 rar rr3% arcname
381 .br 
383 Note that if you run this command from .bat or .cmd file, you need to use rr3%% instead of rr3%, because the command processor treats the single '%' character as the start of a batch file parameter. You may also use 'p' instead of '%', so 'rr3p' will work too.
384 .br 
386 If data is damaged continuously, then each rr\-sector helps to recover 512 bytes of damaged information. This value may be lower in cases of multiple damage.
387 .br 
389 The size of the recovery record may be approximately determined by the formula <archive size>/256 + <number of recovery sectors>*512 bytes.
390 .TP 
391 .RP 
392 .br 
395 \fBrv[N]\fR  Create recovery volumes (.rev files), which can be later
396 .br 
397 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:
398 .br 
400 rar rv3 data.part01.rar
401 .br 
403 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.
404 .br 
406 Each recovery volume is able to reconstruct one missing or damaged RAR 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.
407 .br 
409 Original RAR volumes must not be modified after creating recovery volumes. Recovery algorithm uses data stored both in REV files and in RAR volumes to rebuild missing RAR volumes. So if you modify RAR volumes, for example, lock them, after creating REV files, recovery process will fail.
410 .br 
412 The optional <N> parameter specifies a number of recovery volumes to create and must be less than the total number of RAR 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 RAR volumes. For example:
413 .br 
415 rar rv15% data.part01.rar
416 .br 
418 RAR 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.
419 .TP 
420 .RP 
421 .br 
424 \fBs[name]\fR Convert archive to SFX. The archive is merged with a SFX module
425 .br 
426 (using a module in file default.sfx or specified in the switch). 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.
427 .TP 
428 .RP 
429 .br 
432 \fBs\-\fR     Remove SFX module from the already existing SFX archive.
433 .br 
434 RAR creates a new archive without SFX module, the original SFX archive is not deleted.
435 .TP 
436 .RP 
437 .br 
440 \fBt\fR      Test archive files. This command performs a dummy file
441 .br 
442 extraction, writing nothing to the output stream, in order to validate the specified file(s).
443 .TP 
444 .LP 
445 \fIExamples\fR:
446 .br 
448 Test archives in current directory:
449 .br 
451 rar t '*'
452 .br 
454 or for Windows:
455 .br 
457 rar t *
458 .br 
460 User may test archives in all sub\-directories, starting with the current path:
461 .br 
463 rar t \-r '*'
464 .br 
466 or for Windows:
467 .br 
469 rar t \-r *
470 .TP 
471 .RP 
472 .br 
475 \fBu\fR      Update files in archive. Adds files not yet in the archive
476 .br 
477 and updates files that have been changed since they were packed into the archive.
478 .TP 
479 .RP 
480 .br 
483 \fBv[t,b]\fR Verbosely list the contents of archive [technical].
484 .br 
485 Files are listed using the format: full pathname, file comment, original and compressed size, compression ratio, last update date and time, attributes, CRC, compression method and minimum RAR version required to extract.
486 .br 
488 Optional technical information such as "Host OS", "Solid" and "Old" flags is displayed, when 't' modifier is used. "Host OS" shows the native operating system of RAR version used to create an archive. "Solid" flag is set if file uses the compression statistics from preceding files (see \-s switch). "Old" flag means "Old file version" and indicates if it is the latest or old file version (see \-ver switch for details).
489 .br 
491 Modifier 'b' forces RAR to output only bare file names without any additional information.
492 .br 
494 To list the contents of all archive volumes, use an asterisk ('*') in place of the archive file extension or use the '\-v' switch.
495 .TP 
496 .LP 
497 \fIExample\fR:
498 .br 
500 1) list contents of system.rar archive (technical mode) and  
501 .br 
502    redirect output to file techlist.lst
503 .br 
505    rar vt system >techlist.lst
506 .br 
508 2) list contents of tutorial.rar archive (bare file names mode)
509 .br 
511    rar vb tutorial
512 .TP 
513 .RP 
514 .br 
517 \fBx\fR      Extract files with full path.
518 .TP 
519 .LP 
520 \fIExample\fR:
521 .br 
523 rar x \-av\- \-c\- dime 10cents.txt
524 .br 
526 extract specified file to current path. AV check and comment show are disabled.
527 .TP 
528 .RP 
529 .br 
530 .SH "SWITCHES"
531 The Switches used in conjunction with a command
532 .TP 
533 .RP 
534 .br 
536 \fB\-?\fR     Display help on commands and switches. The same as when none
537 .br 
538 or an illegal command line option is entered.
539 .TP 
540 .RP 
541 .br 
543 \fB\-\-\fR     Stop switches scanning
544 .br 
546 This switch tells to RAR 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.
547 .TP 
548 .LP 
549 \fIExample\fR:
550 .br 
552 add all files from the current directory to the solid archive '\-StrangeName'
553 .br 
555 rar a \-s \-\- \-StrangeName
556 .TP 
557 .RP 
558 .br 
560 \fB\-ac\fR    Clear Archive attribute after compression or extraction
561 .br 
562 (Windows version only).
563 .TP 
564 .RP 
565 .br 
567 \fB\-ad\fR    Append archive name to destination path.
568 .br 
570 This option may be useful when unpacking a group of archives. By default RAR places files from all archives in the same directory, but this switch creates a separate directory for files unpacked from each archive.
571 .TP 
572 .LP 
573 \fIExample\fR:
574 .br 
576 rar x \-ad *.rar data\\
577 .br 
579 RAR will create subdirectories below 'data' for every unpacking archive.
580 .TP 
581 .RP 
582 .br 
584 \fB\-ag[format]\fR
585 .br 
586 Generate archive name using the current date and time.
587 .br 
589 Appends the current date string to an archive name when creating an archive. Useful for daily backups.
590 .br 
592 Format of the appending string is defined by the optional"format" parameter or by "YYYYMMDDHHMMSS" if this parameter is absent. The format string may include the following characters:
593 .br 
595 Y   \- year
596 .br 
597 M   \- month
598 .br 
599 MMM \- month name as text string (Jan, Feb, etc.)
600 .br 
601 W   \- a week number (a week starts with Monday)
602 .br 
603 A   \- day of week number (Monday is 1, Sunday \- 7)
604 .br 
605 D   \- day of month
606 .br 
607 E   \- day of year
608 .br 
609 H   \- hours
610 .br 
611 M   \- minutes (treated as minutes if encountered after hours)
612 .br 
613 S   \- seconds
614 .br 
615 N   \- archive number. RAR searches for already existing archive
616 .br 
617       with generated name and if found, increments the archive
618 .br 
619       number until generating a unique name. 'N' format charac\-
620 .br 
621       ter is not supported when creating volumes.
622 .br 
624 Each of format string characters listed above represents only one character added to archive name. For example, use WW for two digit week number or YYYY to define four digit year.
625 .br 
627 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.
628 .br 
630 The format string may contain optional text enclosed in '{' and '}' characters. This text is inserted into archive name.
631 .br 
633 All other characters are added to an archive name without changes.
634 .br 
636 If you need to update 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 RAR will create a new archive instead of updating the already existing.
637 .TP 
638 .LP 
639 \fIExamples\fR:
640 .br 
642 1) use the default YYYYMMDDHHMMSS format
643 .br 
645    rar a \-ag backup
646 .br 
648 2) use DD\-MMM\-YY format
649 .br 
651    rar a \-agDD\-MMM\-YY backup
652 .br 
654 3) use YYYYMMDDHHMM format, place date before 'backup'
655 .br 
657    rar a \-ag+YYYYMMDDHHMM backup
658 .br 
660 4) use YYYY\-WW\-A format, include fields description
661 .br 
663    rar a \-agYYYY{year}\-WW{week}\-A{wday} backup
664 .br 
666 5) use YYYYMMDD and the archive number. It allows to generate
667 .br 
668    unique names even when YYYYMMDD format mask used more than
669 .br 
670    once in the same day
671 .br 
673    rar a \-agYYYYMMDD\-NN backup
674 .TP 
675 .RP 
676 .br 
678 \fB\-ai\fR    Ignore file attributes.
679 .br 
680 If this switch is used when extracting, RAR 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.
681 .br 
683 In Windows it affects archive, system, hidden and read\-only attributes. In Unix \- user, group, and others file permissions.
684 .TP 
685 .RP 
686 .br 
688 \fB\-ao\fR    Add files with Archive attribute set
689 .br 
690 (Windows version only).
691 .TP 
692 .LP 
693 \fIExample\fR:
694 .br 
696 add all disk C: files with Archive attribute set to the 'f:backup' and clear files Archive attribute
697 .br 
699 rar a \-r \-ac \-ao f:backup c:\\*.*
700 .TP 
701 .RP 
702 .br 
704 \fB\-ap\fR    Set path inside archive. This path is merged to file
705 .br 
706 names when adding files to an archive and removed from file names when extracting.
707 .br 
709 For example, if you wish to add the file 'readme.txt' to the directory 'DOCS\\ENG' of archive 'release', you may run :
710 .br 
712 rar a \-apDOCS\\ENG release readme.txt
713 .br 
715 or to extract 'ENG' to the current directory:
716 .br 
718 rar x \-apDOCS release DOCS\\ENG\\*.*
719 .TP 
720 .RP 
721 .br 
723 \fB\-as\fR    Synchronize archive contents
724 .br 
726 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.
727 .br 
729 For example, after the command:
730 .br 
732 rar a \-u \-as backup sources\\*.cpp
733 .br 
735 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.
736 .TP 
737 .RP 
738 .br 
740 \fB\-av\fR    Put authenticity verification (registered versions only).
741 .br 
742 RAR will put, in every new and updated archive, information concerning the creator, last update time and archive name.
743 .br 
745 If an archive, containing authenticity verification, is being modified and this switch is not specified, the authenticity verification information will be removed.
746 .br 
748 When extracting, testing, listing or updating an archive with the '\-av' switch, RAR will perform integrity validation and display the message:
749 .br 
751   Verifying authenticity information ...
752 .br 
754 In the case of successful authenticity verification, message 'Ok', creator name and last update information will be displayed. In the case of authenticity verification failure, message 'FAILED' will be displayed.
755 .br 
757 RAR authenticity verification can be forged and does not provide the same level of security as modern digital signature schemes based on public key infrastructure. We recommend to use this RAR feature as informational only, like a special archive comment. Avoid it in situations, when accurate information about archive creator is important.
758 .br 
760 In order to enable the authenticity verification feature, the program must be registered. Please contact your local distribution site or the world\-wide distribution center.
761 .TP 
762 .RP 
763 .br 
765 \fB\-av\-\fR   Disable authenticity verification checking or adding.
766 .TP 
767 .RP 
768 .br 
770 \fB\-cfg\-\fR  Ignore configuration file and RAR environment variable.
771 .TP 
772 .RP 
773 .br 
775 \fB\-cl\fR    Convert file names to lower case.
776 .TP 
777 .RP 
778 .br 
780 \fB\-cu\fR    Convert file names to upper case.
781 .TP 
782 .RP 
783 .br 
785 \fB\-c\-\fR    Disable comments show.
786 .TP 
787 .RP 
788 .br 
790 \fB\-df\fR    Delete files after archiving.
791 .br 
793 Move files to archive. This switch in combination with the command "A" performs the same action as the command "M".
794 .TP 
795 .RP 
796 .br 
798 \fB\-dh\fR    Open shared files
799 .br 
801 Allows to process files opened by other applications for writing.
802 .br 
804 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.
805 .br 
807 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.
808 .TP 
809 .RP 
810 .br 
812 \fB\-dr\fR    Delete files to Recycle Bin
813 .br 
815 Delete files after archiving and place them to Recycle Bin.
816 .br 
817 Available in Windows version only.
818 .TP 
819 .RP 
820 .br 
822 \fB\-ds\fR    Do not sort files while adding to a solid archive.
823 .TP 
824 .RP 
825 .br 
827 \fB\-dw\fR    Wipe files after archiving
828 .br 
830 Delete files after archiving. Before deleting file data are overwritten by zero bytes to prevent recovery of deleted files.
831 .TP 
832 .RP 
833 .br 
835 \fB\-ed\fR    Do not add empty directories
836 .br 
838 This switch indicates that directory records are not to be stored in the created archive. When extracting such archives, RAR creates non\-empty directories basing 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.
839 .br 
841 If \-ed is used with 'm' command or \-df switch, RAR will not remove empty directories.
842 .TP 
843 .RP 
844 .br 
846 \fB\-ee\fR    Do not process extended attributes
847 .br 
849 Disables saving and restoring extended file attributes.
850 .br 
851 \fBOnly for OS/2 versions\fR.
852 .TP 
853 .RP 
854 .br 
856 \fB\-en\fR    Do not add "end of archive" block
857 .br 
859 By default, RAR adds an "end of archive" 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.
860 .br 
862 This switch cannot be used with volumes, because the end of archive block contains information important for correct volume processing.
863 .TP 
864 .RP 
865 .br 
867 \fB\-ep\fR    Exclude paths from names. This switch enables files to be added
868 .br 
869 to an archive without including the path information. This could, of course, result in multiple files existing in the archive with the same name.
870 .TP 
871 .RP 
872 .br 
874 \fB\-ep1\fR   Exclude base dir from names. Do not store the path entered in
875 .br 
876 the command line.
877 .TP 
878 .LP 
879 \fIExample\fR:
880 .br 
882 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\\'
883 .br 
885 rar a \-ep1 \-r test tmp\\*
886 .br 
888 This is equivalent to the commands:
889 .br 
891 cd tmp
892 .br 
893 rar a \-r ..\\test
894 .br 
895 cd ..
896 .TP 
897 .RP 
898 .br 
900 \fB\-ep2\fR   Expand paths to full. Store full file paths (except a drive
901 .br 
902 letter and leading path separator) when archiving.
903 .TP 
904 .RP 
905 .br 
907 \fB\-ep3\fR   Expand paths to full including the drive letter.
908 .br 
909 \fBWindows version only\fR.
910 .br 
912 This switch stores full file paths including the drive letter if used when archiving. Drive separators (colons) are replaced by underscore characters.
913 .br 
915 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.
916 .br 
918 This switch can help to backup several disks to the same archive. For example, you may run:
919 .br 
921 rar a \-ep3 \-r backup.rar c:\\ d:\\ e:\\
922 .br 
924 to create backup and:
925 .br 
927 rar x \-ep3 backup.rar
928 .br 
930 to restore it.
931 .br 
933 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.
934 .TP 
935 .RP 
936 .br 
938 \fB\-e[+]<attr>\fR
939 .br 
940 Specifies file exclude or include attributes mask.
941 .br 
943 <attr> is a number in the decimal, octal (with leading '0') or hex (with leading '0x') format.
944 .br 
946 By default, without '+' sign before <attr>, this switch defines the exclude mask. So if result of bitwise AND between <attr> and file attributes is nonzero, file would not be processed.
947 .br 
949 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.
950 .br 
952 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.
953 .br 
955 It is allowed to specify both \-e<attr> and \-e+<attr> in the same command line.
956 .TP 
957 .LP 
958 \fIExamples\fR:
959 .br 
961 1) archive only directory names without their contents
962 .br 
964    rar a \-r \-e+d dirs
965 .br 
967 2) do not compress system and hidden files:
968 .br 
970    rar a \-esh files
971 .br 
973 3) do not extract read\-only files:
974 .br 
976    rar x \-er files
977 .TP 
978 .RP 
979 .br 
981 \fB\-f\fR    Freshen files. May be used with archive extraction or creation.
982 .br 
983 The command string "a \-f" is equivalent to the command 'f', you could also use the switch '\-f' with the commands 'm' or 'mf'. If the switch '\-f' is used with the commands 'x' or 'e', then only old files would be replaced with new versions extracted from the archive.
984 .TP 
985 .RP 
986 .br 
988 \fB\-hp[p]\fR Encrypt both file data and headers.
989 .br 
991 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.
992 .TP 
993 .LP 
994 \fIExample\fR:
995 .br 
997 rar a \-hpfGzq5yKw secret report.txt
998 .br 
1000 will add the file report.txt to the encrypted archive secret.rar using the password 'fGzq5yKw'
1001 .TP 
1002 .RP 
1003 .br 
1005 \fB\-id[c,d,p,q]\fR
1006 .br 
1007 Disable messages.
1008 .br 
1010 Switch \-idc disables the copyright string.
1011 .br 
1013 Switch \-idd disables "Done" string at the end of operation.
1014 .br 
1016 Switch \-idp disables the percentage indicator.
1017 .br 
1019 Switch \-idq turns on the quiet mode, so only error messages and questions are displayed.
1020 .br 
1022 It is allowed to use several modifiers at once, so switch \-idcdp is correct.
1023 .TP 
1024 .RP 
1025 .br 
1027 \fB\-ieml[.][addr]\fR
1028 .br 
1029 Send archive by email. \fBWindows version only\fR.
1030 .br 
1032 Attach an archive created or updated by the add command to email message. You need to have a MAPI compliant email to email message. You need to have a MAPI compliant email client to use this switch (most modern email programs support MAPI interface).
1033 .br 
1035 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.
1036 .br 
1038 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.
1039 .TP 
1040 .RP 
1041 .br 
1043 \fB\-ierr\fR  Send all messages to stderr.
1044 .TP 
1045 .RP 
1046 .br 
1048 \fB\-ilog[name]\fR
1049 .br 
1050 Log errors to file (registered version only).
1051 .br 
1053 Write error messages to rar.log file. If optional 'name' parameter is not specified, the log file is created using the following defaults:
1054 .br 
1056 Unix:    .rarlog file in the user's home directory;
1057 .br 
1058 Windows: rar.log file in %APPDATA%\\WinRAR directory;
1059 .br 
1060 DOS:     rar.log file in the same directory as the rar32.exe.
1061 .br 
1063 If 'name' parameter includes a file name without path, RAR will create the log file in default directory from the list above using the specified name. Include both path and name to 'name' parameter if you wish to change the location of log file.
1064 .TP 
1065 .LP 
1066 \fIExample\fR:
1067 .br 
1069 rar a \-ilogc:\\log\\backup.log backup d:\\docs
1070 .br 
1072 will create c:\\log\\backup.log log file in case of errors.
1073 .TP 
1074 .RP 
1075 .br 
1077 \fB\-inul\fR  Disable all messages.
1078 .TP 
1079 .RP 
1080 .br 
1082 \fB\-ioff\fR  Turn PC off after completing an operation. The hardware must
1083 .br 
1084 support the power off feature. \fBWindows version only\fR.
1085 .TP 
1086 .RP 
1087 .br 
1089 \fB\-isnd\fR  Enable sound.
1090 .TP 
1091 .RP 
1092 .br 
1094 \fB\-k\fR     Lock archive. Any command which intends to change the archive
1095 .br 
1096 will be ignored.
1097 .TP 
1098 .RP 
1099 .br 
1101 \fB\-kb\fR    Keep broken extracted files.
1102 .br 
1104 RAR, by default, deletes files with CRC errors after extraction. The switch \-kb specifies that files with CRC errors should not be deleted.
1105 .TP 
1106 .RP 
1107 .br 
1109 \fB\-m<n>\fR  Set compression method:
1110 .br 
1112 \-m0   store     do not compress file when adding to archive
1113 .br 
1114 \-m1   fastest   use fastest method (less compressive)
1115 .br 
1116 \-m2   fast      use fast compression method
1117 .br 
1118 \-m3   normal    use normal (default) compression method
1119 .br 
1120 \-m4   good      use good compression method (more compressive,
1121 .br 
1122                          but slower)
1123 .br 
1124 \-m5   best      use best compression method (slightly more, but
1125 .br 
1126                          slowest)
1127 .br 
1129 If this switch is not specified, RAR uses \-m3 method (normal compression)
1130 .br 
1132 By default, RAR uses only the general compression algorithm in \-m1 and \-m2 methods, advanced algorithms like audio and true color processing are enabled only in \-m3..\-m5 modes, the advanced text compression is activated only in \-m4..\-m5. This default can be overridden using \-mc switch.
1133 .TP 
1134 .RP 
1135 .br 
1137 \fB\-mc<par><n>\fR
1138 .br 
1139 Set advanced compression parameters.
1140 .br 
1142 This switch is intended mainly for benchmarking and experiments. In the real environment it is usually better to allow RAR 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.
1143 .br 
1145 It has the following syntax:
1146 .br 
1148 \-mc[param1][:param2][module][+ or \-]
1149 .br 
1151 where <module> is the one character field denoting a part of the compression algorithm, which has to be configured.
1152 .br 
1154 It may have the following values:
1155 .br 
1157   A       \- audio compression;
1158 .br 
1159   C       \- true color (RGB) data compression;
1160 .br 
1161   D       \- delta compression;
1162 .br 
1163   E       \- 32\-bit x86 executables compression;
1164 .br 
1165   I       \- 64\-bit Intel Itanium executables compression;
1166 .br 
1167   T       \- text compression.
1168 .br 
1170 \'+\' 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, RAR will choose modules automatically, based on data and the current compression method.
1171 .br 
1173 Switch \-mc\- disables all optional modules and allows only the general compression algorithm.
1174 .br 
1176 <Param1> and <Param2> are module dependent parameters described below.
1177 .br 
1179 Audio compression, delta compression:
1180 .br 
1182 <Param1> is a number of byte channels (can be 1 \- 31). RAR splits multibyte channels to bytes, for example, two 16\-bit audio channels are considered by RAR as four channels one byte each.
1183 .br 
1185 <Param2> is ignored.
1186 .br 
1188 32\-bit x86 Intel executables compression,
1189 .br 
1190 64\-bit Intel Itanium executables compression,
1191 .br 
1192 true color (RGB) data compression:
1193 .br 
1195 <Param1> and <Param2> are ignored.
1196 .br 
1198 Text compression: 
1199 .br 
1201 <Param1> is the order of PPM 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 PPM. In case of lack of memory the result may be negative. Higher order values decrease both compression and decompression speed.
1202 .br 
1204 <Param2> is memory in megabytes allocated for PPM (1\-128). Higher values may increase the compression ratio, but note that PPM 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.
1205 .TP 
1206 .LP 
1207 \fIExamples\fR:
1208 .br 
1210 1) switch \-mc1a+ forces use of 8\-bit mono audio compression for
1211 .br 
1212    all data.
1213 .br 
1215 2) switch \-mc10:40t+ forces use of text compression algorithm 
1216 .br 
1217    for all data,  sets the compression order to 10 and alloca\-
1218 .br 
1219    tes 40 MB memory.
1220 .br 
1222 3) switch \-mc12t sets the text compression order to 12, when the
1223 .br 
1224    text compression is used, but leaves to RAR to decide when to
1225 .br 
1226    use it.
1227 .br 
1229 4) switches \-mct\- \-mcd\- disable text and delta compression.
1230 .TP 
1231 .RP 
1232 .br 
1234 \fB\-md<n>\fR Select dictionary size <n> in KB. Must be 64, 128, 256, 512,
1235 .br 
1236 1024, 2048 or 4096 or a letter 'a', 'b', 'c', 'd', 'e', 'f', 'g' respectively.
1237 .br 
1239 The sliding dictionary is a special memory area used by the compression algorithm. If the size of the file being compressed (or the total files size in the case of a solid archive) is greater than the dictionary size, then increasing the dictionary size will generally increase compression ratio, decrease packing speed and increase memory requirements.
1240 .br 
1242 RAR can reduce the dictionary size if it is significantly larger than the size of the source data. It helps to reduce memory requirements without decreasing compression.
1243 .br 
1245 Default sliding dictionary size is 4096 KB.
1246 .TP 
1247 .LP 
1248 \fIExample\fR:
1249 .br 
1251 rar a \-s \-mdd sources *.asm
1252 .br 
1255 .br 
1257 rar a \-s \-md512 sources *.asm
1258 .br 
1260 Will create a solid archive using a 512 KB dictionary.
1261 .TP 
1262 .RP 
1263 .br 
1265 \fB\-ms[list]\fR
1266 .br 
1267 Specify file types to store.
1268 .br 
1270 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.
1271 .br 
1273 Optional <list> parameter defines the list of file extensions separated by semicolons. For example, \-msrar;zip;jpg will force RAR to store without compression all RAR and ZIP archives and JPG images. It is also allowed to specify wildcard file masks in the list, so \-ms*.rar;*.zip;*.jpg will work too.
1274 .br 
1276 If <list> is not specified, \-ms switch will use the default set of extensions, which includes the following file types:
1277 .br 
1279 7z, ace, arj, bz2, cab, gz, jpeg, jpg, lha, lzh, mp3, rar, taz, tgz, z, zip
1280 .TP 
1281 .RP 
1282 .br 
1284 \fB\-mt<threads>\fR
1285 .br 
1286 Set the number of threads. Available in Windows version only.
1287 .br 
1289 <threads> parameter can take values from 0 to 16. It defines the recommended number of active threads for compression algorithm. If it is greater than 0, RAR will use the multithreaded version of compression algorithm providing higher speed on multiprocessor architectures. Real number of active threads can differ from the specified.
1290 .br 
1292 If <threads> is zero, RAR will use the single threaded compression algorithm.
1293 .br 
1295 Change of <threads> 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.
1296 .br 
1298 If \-mt switch is not specified, RAR will try to detect the number of available processors and select the optimal number of threads automatically.
1299 .TP 
1300 .RP 
1301 .br 
1303 \fB\-n<f>\fR  Include only the specified file <f>. Wildcards may be used
1304 .br 
1305 both in the name and file parts of file mask. You may specify the switch '\-n' several times.
1306 .br 
1308 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.
1309 .br 
1311 For example, if you need to compress all *.txt and *.lst files in directories Project and Info, you can enter:
1312 .br 
1314 rar a \-r text Project\\*.txt Project\\*.lst Info\\*.txt Info\\*.lst
1315 .br 
1317 or using the switch \-n:
1318 .br 
1320 rar a \-r \-n*.txt \-n*.lst text Project Info
1321 .TP 
1322 .RP 
1323 .br 
1325 \fB\-n@<lf>\fR Include files listed in the specified list file.
1326 .br 
1328 Similar to \-n<f> switch, but reads include masks from the list file. If you use \-n@ without the list file name parameter, it will read file names from stdin.
1329 .TP 
1330 .LP 
1331 \fIExample\fR:
1332 .br 
1334 rar a \-r \-n@inclist.txt text Project Info
1335 .TP 
1336 .RP 
1337 .br 
1339 \fB\-oc\fR     Set NTFS Compressed attribute. \fBWin32 version only\fR.
1340 .br 
1342 This switch allows to restore NTFS Compressed attribute when extracting files. RAR saves Compressed file attributes when creating an archive, but does not restore them unless \-oc switch is specified.
1343 .TP 
1344 .RP 
1345 .br 
1347 \fB\-ol\fR     Save symbolic links as the link instead of the file.
1348 .br 
1349 \fBUnix version only.\fR
1350 .TP 
1351 .RP 
1352 .br 
1354 \fB\-or\fR     Rename extracted files automatically if file with the same name
1355 .br 
1356 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.
1357 .TP 
1358 .RP 
1359 .br 
1361 \fB\-os\fR     Save NTFS streams. \fBWindows version only\fR.
1362 .br 
1364 This switch has meaning only for NTFS file system and allows to save alternative data streams associated with a file. It is especially important in Windows 2000, XP and newer, which use streams to keep some file dependent information like file descriptions. If you use RAR to backup your NTFS disks, it is recommended to specify this switch.
1365 .TP 
1366 .RP 
1367 .br 
1369 \fB\-ow\fR     Use this switch when archiving to save file security
1370 .br 
1371 information and when extracting to restore it.
1372 .br 
1374 Unix RAR version saves file owner and group when using this switch.
1375 .br 
1377 Windows version stores owner, group, file permissions and audit information, but only if you have necessary privileges to read them. Note that only NTFS file system supports file based security under Windows.
1378 .TP 
1379 .RP 
1380 .br 
1382 \fB\-o[+|\-]\fR Set the overwrite mode. Can be used both when extracting
1383 .br 
1384 and updating archived files. Following modes are available:
1385 .br 
1387 \-o           Ask before overwrite
1388 .br 
1389              (default for extracting files);
1390 .br 
1392 \-o+          Overwrite all
1393 .br 
1394              (default for updating archived files);
1395 .br 
1397 \-o\-          Skip existing files.
1398 .TP 
1399 .RP 
1400 .br 
1402 \fB\-p[p]\fR  Encrypt files with the string <p> as password while archiving.
1403 .br 
1404 The password is case\-sensitive. If you omit the password on the command line, you will be prompted with message "Enter password".
1405 disables such behavior. a \-pmyhoney secret1 *.txt 
1406 .br 
1408 add files *.txt and encrypt them with password "myhoney".
1409 .TP 
1410 .RP 
1411 .br 
1413 \fB\-p\-\fR    Do not query password
1414 .TP 
1415 .RP 
1416 .br 
1418 \fB\-r\fR     Recurse subdirectories. May be used with commands:
1419 .br 
1420 a, u, f, m, x, e, t, p, v, l, c, cf and s.
1421 .br 
1423 When used with the commands 'a', 'u', 'f', 'm' will process files in all sub\-directories as well as the current working directory.
1424 .br 
1426 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.
1427 .TP 
1428 .RP 
1429 .br 
1431 \fB\-r\-\fR    Disable recursion.
1432 .br 
1434 Even without \-r switch RAR can enable the recursion automatically in some situations. Switch \-r\- prohibits it.
1435 .br 
1437 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.
1438 .TP 
1439 .LP 
1440 \fIExample\fR:
1441 .br 
1443 rar a \-r\- arc dirname
1444 .br 
1446 command will add only the empty 'dirname' directory and ignore its contents. Following command:
1447 .br 
1449 rar a \-r\- arc c:\\
1450 .br 
1452 will compress contents of root c: directory only and  will not recurse into subdirectories.
1453 .TP 
1454 .RP 
1455 .br 
1457 \fB\-r0\fR    Similar to \-r, but when used with the commands 'a', 'u', 'f',
1458 .br 
1459 'm' will recurse subdirectories only for those names, which include wildcard characters '*' and '?'
1460 .TP 
1461 .RP 
1462 .br 
1464 \fB\-ri<p>[:<s>]\fR
1465 .br 
1466 Set priority and sleep time. Available only in RAR for Windows. This switch regulates system load by RAR in multitasking environment. Possible task priority <p> values are 0 \- 15.
1467 .br 
1469 If <p> is 0, RAR uses the default task priority. <p> equal to 1 sets the lowest possible priority, 15 \- the highest possible.
1470 .br 
1472 Sleep time <s> 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 <s> may be useful if you need to reduce system load even more than can be achieved with <p> parameter.
1473 .TP 
1474 .LP 
1475 \fIExample\fR:
1476 .br 
1478 execute RAR with default priority and 10 ms sleep time:
1479 .br 
1481 rar a \-ri0:10 backup *.*
1482 .TP 
1483 .RP 
1484 .br 
1486 \fB\-rr[N]\fR Add a data recovery record. This switch is used when creating
1487 .br 
1488 or modifying an archive to add a data recovery record to the archive. See the 'rr[N]' command description for details.
1489 .TP 
1490 .RP 
1491 .br 
1493 \fB\-rv[N]\fR Create recovery volumes. This switch is used when creating
1494 .br 
1495 a multivolume archive to generate recovery volumes. See the 'rv[N]' command description for details.
1496 .TP 
1497 .RP 
1498 .br 
1500 \fB\-s\fR     Create solid archive. A Solid archive is an archive packed by
1501 .br 
1502 a special compression method, which treats several or all files, within the archive, as one continuous data stream.
1503 .br 
1505 Solid archiving significantly increase 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.
1506 .br 
1508 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, rarfile.lst.
1509 .TP 
1510 .LP 
1511 \fIExample\fR:
1512 .br 
1514 create solid archive sources.rar with 512 KB dictionary, recursing all directories, starting with the current directory. Add only .asm files:
1515 .br 
1517 rar a \-s \-md512 sources.rar *.asm \-r
1518 .TP 
1519 .RP 
1520 .br 
1522 \fB\-s<N>\fR  Create solid groups using file count
1523 .br 
1525 Similar to \-s, but resets solid statistics after compressing <N> files. Usually decreases compression, but also decreases losses in case of solid archive damages.
1526 .TP 
1527 .RP 
1528 .br 
1530 \fB\-sc<charset>[objects]\fR
1531 .br 
1532 Specify the character set for list files and archive comment files.
1533 .br 
1535 'Charset' parameter is mandatory and can have one of the following values:
1536 .br 
1538   U \- Unicode;
1539 .br 
1540   A \- ANSI (Windows) encoding. Windows version only;
1541 .br 
1542   O \- OEM (DOS) encoding. Windows version only.
1543 .br 
1545 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.
1546 .br 
1548 'Objects' parameter is optional and can have one of the following values:
1549 .br 
1551   L \- list files;
1552 .br   
1553   C \- comment files.
1554 .br 
1556 It is allowed to specify more than one object, for example, \-scolc. If 'objects' parameter is missing, 'charset' is applied to all objects.
1557 .br 
1559 This switch allows to specify the character set for files in \-z[file] switch, list files and comment files written by "cw" command.
1560 .TP 
1561 .LP 
1562 \fIExamples\fR:
1563 .br 
1565 1) rar a \-scol data @list
1566 .br 
1568    Read names contained in 'list' using OEM encoding.
1569 .br 
1571 2) rar c \-scuc \-zcomment.txt data
1572 .br 
1574    Read comment.txt as Unicode file.
1575 .br 
1577 3) rar cw \-scuc data comment.txt
1578 .br 
1580    Write comment.txt as Unicode file.
1581 .TP 
1582 .RP 
1583 .br 
1585 \fB\-se\fR     Create solid groups using extension
1586 .br 
1588 Similar to \-s, but reset solid statistics if file extension is changed. Usually decreases compression, but also decreases losses from solid archive damages.
1589 .TP 
1590 .RP 
1591 .br 
1593 \fB\-sfx[name]\fR
1594 .br 
1595 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.
1596 .TP 
1597 .LP 
1598 \fIExample\fR:
1599 .br 
1601 rar a \-sfxwincon.sfx myinst
1602 .br 
1604 create SelF\-eXtracting (SFX) archive using wincon.sfx SFX\-module.
1605 .TP 
1606 .RP 
1607 .br 
1609 \fB\-si[name]\fR
1610 .br 
1611 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.
1612 .TP 
1613 .LP 
1614 \fIExample\fR:
1615 .br 
1617 type Tree.Far | rar a \-siTree.Far tree.rar
1618 .br 
1620 will compress 'type Tree.Far' output as 'Tree.Far' file.
1621 .TP 
1622 .RP 
1623 .br 
1625 \fB\-sl<size>\fR
1626 .br 
1627 Process only those files, which size is less than specified in <size> parameter of this switch. Parameter <size> must be specified in bytes.
1628 .TP 
1629 .RP 
1630 .br 
1632 \fB\-sm<size>\fR
1633 .br 
1634 Process only those files, which size is more than specified in <size> parameter of this switch.Parameter <size> must be specified in bytes.
1635 .TP 
1636 .RP 
1637 .br 
1639 \fB\-sv\fR    Create independent solid volumes
1640 .br 
1642 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).
1643 .br 
1645 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.
1646 .br 
1648 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.
1649 .br 
1651 Ignored if used when creating a non\-volume archive.
1652 .TP 
1653 .RP 
1654 .br 
1656 \fB\-sv\-\fR   Create dependent solid volumes
1657 .br 
1659 Disables to reset solid statistics between volumes.
1660 .br 
1662 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.
1663 .br 
1665 Ignored if used when creating a non\-volume archive.
1666 .TP 
1667 .RP 
1668 .br 
1670 \fB\-s\-\fR    Disable solid archiving
1671 .TP 
1672 .RP 
1673 .br 
1675 \fB\-t\fR     Test files after archiving. This switch is especially useful in
1676 .br 
1677 combination with the move command, so files will be deleted only if the archive had been successfully tested.
1678 .TP 
1679 .RP 
1680 .br 
1682 \fB\-ta<date>\fR
1683 .br 
1684 Process only files modified after the specified date.
1685 .br 
1687 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".
1688 .TP 
1689 .RP 
1690 .br 
1692 \fB\-tb<date>\fR
1693 .br 
1694 Process only files modified before the specified date. Format of the switch is the same as \-ta<date>.
1695 .TP 
1696 .RP 
1697 .br 
1699 \fB\-tk\fR    Keep original archive date. Prevents RAR from modifying the
1700 .br 
1701 archive date when changing an archive.
1702 .TP 
1703 .RP 
1704 .br 
1706 \fB\-tl\fR    Set archive time to newest file. Forces RAR to set the date of
1707 .br 
1708 a changed archive to the date of the newest file in the archive.
1709 .TP 
1710 .RP 
1711 .br 
1713 \fB\-tn<time>\fR
1714 .br 
1715 Process files newer than the specified time period. Format of the time string is:
1716 .br 
1718 [<ndays>d][<nhours>h][<nminutes>m][<nseconds>s]
1719 .br 
1721 For example, use switch \-tn15d to process files newer than 15 days and \-tn2h30m to process files newer than 2 hours 30 minutes.
1722 .TP 
1723 .RP 
1724 .br 
1726 \fB\-to<time>\fR
1727 .br 
1728 Process files older than the specified time period. Format of the switch is the same as \-tn<time>.
1729 .TP 
1730 .RP 
1731 .br 
1733 \fB\-ts<m,c,a>[N]\fR
1734 .br 
1735 Save or restore file time (modification, creation, access).
1736 .br 
1738 Switch \-tsm instructs RAR to save file modification time, \-tsc \- creation time and tsa \- last access time. Optional parameter after the switch is the number between 0 and 4 controlling the file time precision. Value '1' enables 1 second precision, 2 \- 0.0065536 sec, 3 \- 0.0000256 sec and 4 or '+' enables the maximum NTFS time precision, which is equal to 0.0000001 sec. Value '0' or '\-' means that creation and access time are not saved and low (two seconds) precision is used for modification time. Higher precision modes add more data to archive, up to 19 additional bytes per file in case of \-tsm4 \-tsa4 \-tsc4 combination. If no precision is specified, RAR uses '4' (high) value.
1739 .br 
1741 Default RAR mode is \-tsm4 \-tsc0 \-tsa0, so modification time is stored with the high precision and other times are ignored.
1742 .br 
1744 It is necessary to specify \-tsc and \-tsa switches to set creation and access time when unpacking files (precision is irrelevant, but must not be 0). By default RAR sets only the modification time, even if archive contains creation and last access time. Setting the modification time to unpacked files may be also disabled with \-tsm\-.
1745 .br 
1747 It is possible to omit the time type letter if you need to apply the switch to all three times. For example, \-tsm4 \-tsa4 \-tsc4 can be replaced by \-ts4, \-ts+ or \-ts. Use \-ts\- to save only the low precision modification time or to ignore all three file times on unpacking.
1748 .br 
1750 When creating an archive, RAR automatically reduces the precision if high mode is not supported by the file system. It is not more than 2 seconds on FAT and 1 second in Unix. NTFS time precision is 0.0000001 second.
1751 .br 
1753 Operating systems limit which time can be set on unpacking. Windows allows to set all three times, Unix \- modification and last access, but not creation, DOS supports only the modification time.
1754 .TP 
1755 .LP 
1756 \fIExamples\fR:
1757 .br 
1759 1) rar a \-ts backup
1760 .br 
1762    Store all file times with the highest possible precision.
1763 .br 
1765 2) rar x \-tsa backup
1766 .br 
1768    Restore modification and last access time. Switch \-tsm is not
1769 .br 
1770    required, because RAR uses it by default.
1771 .br 
1774 3) rar a \-tsm1 \-tsc1 backup
1775 .br 
1777    Store low precision modification and creation time. Without
1778 .br 
1779    \-tsm1 RAR would save the high precision modification time.
1780 .TP 
1781 .RP 
1782 .br 
1784 \fB\-u\fR     Update files. May be used with archive extraction or creation.
1785 .br 
1786 The command string "a \-u" is equivalent to the command 'u', you could also use the switch '\-u' with the commands 'm' or 'mf'. If the switch '\-u' is used with the commands 'x' or 'e', then files not present on the disk and files newer than their copies on the disk would extracted from the archive.
1787 .TP 
1788 .RP 
1789 .br 
1791 \fB\-v\fR     Create volumes with size autodetection or list all volumes
1792 .br 
1794 This switch may be used when creating or listing volumes.
1795 .br 
1797 In the first case it enables volume size autodetection, so new volumes will use all available space on the destination media. It is convenient when creating volumes on removable disks. You may read more about volumes in \-v<size> description.
1798 .br 
1800 In the second case, when this switch is used together with 'V' or 'L' command, it forces RAR to list contents of all volumes starting from that specified in the command line. Without this switch RAR displays contents of only one single  specified volume.
1801 .TP 
1802 .RP 
1803 .br 
1805 \fB\-v<size>[k|b|f|m|M|g|G]\fR
1806 .br 
1807 Create volumes with size=<size>*1000 [*1024 | *1]. By default this switch uses <size> as thousands (1000) of bytes (not 1024 x bytes). You may also enter the size in kilobytes using the symbol 'k', in bytes using the symbol 'b', megabytes \- 'm', millions of bytes \- 'M', gigabytes \- 'g', billions (milliards) of bytes \- 'G' or select one of several predefined values using the symbol 'f' following the numerical value. Predefined values can be 360, 720, 1200, 1440 or 2880 and replaced with corresponding floppy disk size.
1808 .br 
1810 If the size is omitted, autodetection will be used.
1811 .br 
1813 You may specify several \-v switches to set different sizes for different volumes. For example:
1814 .br 
1816   rar a \-v100k \-v200k \-v300k arcname
1817 .br 
1819 sets 100 KB size for first volume, 200 KB for second and 300 KB for all following volumes.
1820 .br 
1822 If volumes are created on removable media, then after the creation of the first volume, the user will be prompted with:
1823 .br 
1825   Create next volume: Yes/No/All
1826 .br 
1828 At this moment in time, you should change the disks. Answering 'A' will cause all volumes to be created without a pause.
1829 .br 
1831 By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. Using \-vn switch it is possible to switch to another, extension based naming scheme, where the first volume file in a multi\-volume set has the extension .rar, following volumes are numbered from .r00 to .r99.
1832 .br 
1834 When extracting or testing a multi\-volume archive you must use only the first volume name. If there is no next volume on the drive and the disk is removable, the user will be prompted with:
1835 .br 
1837  Insert disk with <next volume name>
1838 .br 
1840 Insert the disk with the correct volume and press any key.
1841 .br 
1843 If while extracting, the next volume is not found and volumes are placed on the non\-removable disk, RAR will abort with the error message:
1844 .br 
1846  Cannot find <volume name>
1847 .br 
1849 Archive volumes may not be modified. The commands 'd', 'f', 'u', 's' cannot be used with Multi\-volume sets. The command 'a' may be used only for the creation of a new multi\-volume sequence.
1850 .br 
1852 It is possible, although unlikely, that the file size, of a file in a multi\-volume set, could be greater than its uncompressed size. This is due to the fact that 'storing' (no compression if size increases) cannot be enabled for multi\-volume sets.
1853 .br 
1855 Archive volumes may be Self\-Extracting (SFX). Such an archive should be created using both the '\-v' and '\-sfx' switches.
1856 .TP 
1857 .LP 
1858 \fIExample\fR:
1859 .br 
1860 create archive in volumes of fixed size:
1861 .br 
1863 rar a \-s \-v1440 floparch.rar *.*
1864 .br 
1866 will create solid volumes of size 1440000 bytes.
1867 .TP 
1868 .RP 
1869 .br 
1871 \fB\-vd\fR    Erase disk contents before creating volume
1872 .br 
1874 All files and directories on the target disk will be erased when '\-vd' is used.  The switch applies only to removable media, the hard disk cannot be erased using this switch.
1875 .TP 
1876 .RP 
1877 .br 
1879 \fB\-ver[n]\fR File version control
1880 .br 
1882 Forces RAR to keep previous file versions when updating files in the already existing archive. Old versions are renamed to 'filename;n', where 'n' is the version number.
1883 .br 
1885 By default, when unpacking an archive without the switch \-ver, RAR extracts only the last added file version, the name of which does not include a numeric suffix. But if you specify a file name exactly, including a version, it will be also unpacked. For example, 'rar x arcname' will unpack only last versions, when 'rar x arcname file.txt;5' will unpack 'file.txt;5', if it is present in the archive.
1886 .br 
1888 If you specify \-ver switch without a parameter when unpacking, RAR will extract all versions of all files that match the entered file mask. In this case a version number is not removed from unpacked file names. You may also extract a concrete file version specifying its number as \-ver parameter. It will tell RAR to unpack only this version and remove a version number from file names. For example, 'rar x \-ver5 arcname' will unpack only 5th file versions.
1889 .br 
1891 If you specify 'n' parameter when archiving, it will limit the maximum number of file versions stored in the archive. Old file versions exceeding this threshold will be removed.
1892 .TP 
1893 .RP 
1894 .br 
1896 \fB\-vn\fR    Use the old style volume naming scheme
1897 .br 
1899 By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. Using \-vn switch it is possible to switch to another, extension based naming scheme, where the first volume file in a multi\-volume set has the extension .rar, following volumes are numbered from .r00 to .r99. It may have sense, if you are going to unpack an archive under the plain MS DOS, which does not allow more than one dot in a file name.
1900 .TP 
1901 .RP 
1902 .br 
1904 \fB\-vp\fR    Pause before each volume
1905 .br 
1907 By default RAR asks for confirmation before creating or unpacking next volume only for removable disk. This switch forces RAR to ask such confirmation always. It can be useful if disk space is limited and you wish to copy each volume to another media immediately after creation.
1908 .TP 
1909 .RP 
1910 .br 
1912 \fB\-w<p>\fR  Assign work directory as <p>. This switch may be used to assign
1913 .br 
1914 the directory for temporary files.
1915 .TP 
1916 .RP 
1917 .br 
1919 \fB\-x<f>\fR  Exclude specified file <f>, file or directory. Wildcards can be used in both the
1920 .br 
1921 name and path parts of file mask. You may specify the switch '\-x' several times.
1922 .br 
1924 If mask contains wildcards, it applies to files in current directory and its subdirectories. It is not recursive without wildcards, so "filename" mask will exclude some "filename" in all directories, you need to specify two masks: 'filename' file only in current directory when archiving or in root archive directory when extracting.
1925 .br 
1927 Use "*\\filename" syntax to exclude "filename" recursively in all directories.
1928 .br 
1930 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 ('\\' for Windows and '/' for Unix). For example, "*tmp*\\" mask will exclude all directories matching "*tmp*" and "*\\tmp\\" will exclude all 'tmp' directories. Since wildcards are present,both masks will be applied to contents of current directory and all its subdirectories.
1931 .br 
1933 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.
1934 .TP 
1935 .LP 
1936 \fIExamples\fR:
1937 .br 
1939 1) rar a \-r \-x*.jpg \-x*.avi rawfiles
1940 .br 
1942    compress all files except *.jpg and *.avi in current directory and its 
1943 .br 
1944    subdirectories;
1945 .br 
1947 2) rar a \-r \-x*\\temp savec c:\\*
1948 .br 
1950    compress all files on the disk c: except 'temp' directories and
1951 .br 
1952    files inside of 'temp' directories;
1953 .br 
1956 3) rar x \-x*.txt docs
1957 .br 
1959     extract all files except *.txt from docs.rar.
1960 .TP 
1961 .RP 
1962 .br 
1964 \fB\-x@<lf>\fR Exclude files listed in the specified list file. If you use \-x@
1965 .br 
1966 without the list file name parameter, it will read file names from stdin.
1967 .TP 
1968 .LP 
1969 \fIExample\fR:
1970 .br 
1972 rar a \-x@exlist.txt arch *.exe
1973 .TP 
1974 .RP 
1975 .br 
1977 \fB\-y\fR     Assume Yes on all queries.
1978 .TP 
1979 .RP 
1980 .br 
1982 \fB\-z[f]\fR  Read archive comment from file <f>. Use with \-sc switch if you
1983 .br 
1984 if you need to specify the character set for comment text file. If <f> is not specified, comment is read from stdin.
1985 .TP 
1986 .RP 
1987 .br 
1988 .SH "LIMITATIONS"
1989 .br 
1991 Pathname is limited to 259 symbols.
1992 .br 
1994 Maximum archive comment length is 62000 bytes.
1995 .br 
1997 Command limitations:
1998 .br 
2000 The commands 'd','u','f','c','cf' will not operate with archive volumes.
2001 .br 
2003 The command 'a' cannot be used to update an archive volume, only to create a new one.
2004 .TP 
2005 .RP 
2006 .br 
2007 .SH "EXIT VALUES"
2008 .br 
2010 RAR exits with a zero code (0) in case of successful operation. 
2011 .br 
2012 Non\-zero exit code indicates some kind of error:
2014 .br 
2016    0   SUCCESS          Successful operation
2017 .br 
2019    1   WARNING          Non fatal error(s) occurred
2020 .br 
2022    2   FATAL ERROR      A fatal error occurred
2023 .br 
2025    3   CRC ERROR        A CRC error occurred when unpacking
2026 .br 
2028    4   LOCKED ARCHIVE   Attempt to modify an archive previously 
2029 .br 
2030                         locked by the 'k' command
2031 .br 
2033    5   WRITE ERROR      Write to disk error
2034 .br 
2036    6   OPEN ERROR       Open file error
2037 .br 
2038    
2039    7   USER ERROR       Command line option error.
2040 .br 
2041    
2042    8   MEMORY ERROR     Not enough memory for operation.
2043 .br 
2045    9   CREATE ERROR     Create file error
2046 .br 
2048   10   NO FILES ERROR   No files matching the specified mask were found.
2049 .br 
2051  255   USER BREAK       User stopped the process
2053 .SH "CONFIGURATION FILES"
2054 .br 
2056 RAR for Unix reads configuration information from the file .rarrc in the user's home directory (stored in HOME environment variable) or in /etc directory.
2057 .br 
2059 RAR for Windows reads configuration information from the file rar.ini, placed in the same directory as the rar.exe file.
2060 .br 
2062 This file may contain the following string:
2063 .br 
2065 switches=any RAR switches, separated by spaces
2066 .TP 
2067 .LP 
2068 \fIExample\fR:
2069 .br 
2071 switches=\-m5 \-s
2072 .br 
2075 .SH "ENVIRONMENT VARIABLES"
2076 .br 
2078 Default parameters may be added to the RAR command line by establishing an environment variable "RAR".
2079 .br 
2081 For instance, in Unix following lines may be added to your profile:
2082 .br 
2084   RAR='\-s \-md1024'
2085   export RAR
2086 .br 
2088 RAR will use this string as default parameters in the command line and will create "solid" archives with 1024 KB sliding dictionary size.
2089 .br 
2091 RAR handles options with priority as following:
2092 .br 
2094    command line switches                   highest priority
2095 .br 
2096    switches in the RAR variable            lower priority
2097 .br 
2098    switches saved in configuration file    lowest priority
2099 .br 
2101 .SH "LOG FILE"
2102 .br 
2104 If the switch \-ilog is specified in the command line or configuration file, RAR will write informational messages, concerning errors encountered while processing archives, into a log file. Read switch \-ilog description for more details.
2105 .br 
2107 .SH "THE FILE ORDER LIST FOR SOLID ARCHIVING - RARFILES.LST"
2108 .br 
2110 rarfiles.lst contains a user\-defined file list, which tells RAR the order in which to add files to a solid archive. It may contain file names, wildcards and special entry \- $default. The default entry defines the place in order list for files not matched with other entries in this file. The comment character is ';'.
2111 .br 
2113 In Windows this file should be placed in the same directory as RAR  or in %APPDATA%\\WinRAR directory, in Unix \- to the user's home directory or in /etc.
2114 .br 
2116 Tips to provide improved compression and speed of operation:
2117 .br 
2119 \- similar files should be grouped together in the archive;
2120 .br 
2121 \- frequently accessed files should be placed at the beginning.
2122 .br 
2124 Normally masks placed nearer to the top of list have a higher priority, but there is an exception from this rule. If rarfiles.lst 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'.
2125 .br 
2127 .SH "GLOSSARY"
2128 .br 
2130    Archive      Special file containing one or more files optionally
2131 .br 
2132                 compressed and/or encrypted.
2133 .br 
2135    Compression  A method of encoding data to reduce it's size.
2136 .br 
2138    CRC          Cyclic Redundancy Check. Mathematical method calculat\-
2139 .br 
2140                 ing special checking information for data validity.
2141 .br 
2143    SFX          Archive module used to extract files from when exe\-
2144 .br 
2145                          cuted. (SelF\-eXtracting module), usually in the form
2146 .br 
2147                          of a .EXE file.
2148 .br 
2150    Solid        An archive packed using a special compression method
2151 .br 
2152                          which sees all files as one continuous data stream.
2153 .br 
2154                          Particularly advantageous when packing a large number
2155 .br 
2156                          of small files.
2157 .br 
2159    Volume       Part of a split archive. Splitting an archive to vo\-
2160 .br 
2161                          lumes allows storing them on several removable disks.
2162 .br 
2163                          Solid volumes must be extracted starting from first
2164 .br 
2165                          volume in sequence.
2167 .SH "COPYRIGHTS"
2168 .br 
2170  (c) 1993\-2011 Alexander Roshal
2171 .SH "AUTHOR"
2172 .TP 
2174 Converted rar.txt for Archlinux by TuxSpirit.