P. 1
Rar

Rar

|Views: 0|Likes:
Published by Aaron Schatzer

More info:

Published by: Aaron Schatzer on Jan 30, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

01/30/2012

pdf

text

original

User's Manual ~~~~~~~~~~~~~ RAR 4.01 console version ~~~~~~~~~~~~~~~~~~~~~~~~ =-=-=-=-=-=-=-=-=-=-=-=-=-=Welcome to the RAR Archiver!

-=-=-=-=-=-=-=-=-=-=-=-=-=-= Introduction ~~~~~~~~~~~~ RAR is a powerful tool allowing you to manage and control archive files. Console RAR supports archives only in RAR format, the names of which usually have a ".rar" extension. ZIP and other formats are not supported. Windows users may install GUI RAR version - WinRAR, which is able to process many more archive types. RAR features include: * Highly sophisticated, original compression algorithm * Special compression algorithms optimized for text, audio, graphics data, 32 and 64-bit Intel executables * Better compression than similar tools, using 'solid' archiving * Authenticity verification (registered version only) * Self-extracting archives and volumes (SFX) * Ability to recover physically damaged archives * Locking, password, file order list, file security & more ... Configuration file ~~~~~~~~~~~~~~~~~~ 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. RAR for Windows reads configuration information from the file rar.ini, placed in the same directory as the rar.exe file. This file may contain the following string: switches=any RAR switches, separated by spaces For example: switches=-m5 -s Environment variable ~~~~~~~~~~~~~~~~~~~~ Default parameters may be added to the RAR command line by establishing an environment variable "RAR". For instance, in Unix following lines may be added to your profile: RAR='-s -md1024' export RAR

RAR will use this string as default parameters in the command line and will create "solid" archives with 1024 KB sliding dictionary size. RAR handles options with priority as following: command line switches switches in the RAR variable switches saved in configuration file Log file ~~~~~~~~ If the switch -ilog is specified in the command line or configuration file, RAR will write informational messages, concerning errors encountered while processing archives, into a log file. Read switch -ilog description for more details. The file order list for solid archiving - rarfiles.lst ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 ';'. 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. Tips to provide improved compression and speed of operation: - similar files should be grouped together in the archive; - frequently accessed files should be placed at the beginning. 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'. RAR command line syntax ~~~~~~~~~~~~~~~~~~~~~~~ Syntax RAR <command> [ -<switches> ] <archive> [ <@listfiles...> ] [ <files...> ] [ <path_to_extract\> ] Description 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 highest priority lower priority lowest priority

parameters are archive name and files to be archived into or extracted from the archive. 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: c:\work\doc\*.txt c:\work\image\*.bmp c:\work\misc and then run: rar a backup @backup.lst If you wish to read file names from stdin (standard input), specify the empty listfile name (just @). By default, Windows console RAR uses OEM (DOS) encoding in list files. but it can be redefined with -sc<charset>l switch. 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 In Unix you need to enclose RAR 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: rar e '*.rar' '*.asm' Command could be any of the following: a Add files to archive. Examples: 1) add all *.hlp files from the current directory to the archive help.rar: rar a help *.hlp 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: rar a -r -v362 -s -sfx -rr save Because no file names are specified, all files (*) are assumed. 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. The following command will add all files from the directory //backup text documents //backup pictures

This command can be used with most of archive modification switches to modify archive parameters.txt file: rar c -zinfo. which do not have a dedicated command. Example: rar cf bigarch *. If output file name is not specified. File comments are displayed when the 'v' command is given.txt ch Change archive parameters. The following command adds a comment from info. encrypt or decrypt archive data and it cannot merge or create volumes. Comments are displayed while the archive is being processed. 'ch' command just copies the archive data without modification. File comment length is limited to 32767 bytes.rar Bitmaps\* c Add archive comment. The following command will add all files from directory Bitmaps.rar Bitmaps 4) if directory name includes file masks or trailing backslashes.rar: rar a Pictures. but not from its subdirectories.Bitmaps and its subdirectories to the RAR archive Pictures. If used without any switches. -tl. because switch -r is not specified: rar a Pictures. normal rules apply and you need to specify switch -r to process its subdirectories. Format of output file depends on -sc switch. -cl.rar Also comments may be added from a file using -z[file] switch. -cu.txt dummy cf Add files comment. Example: Set archive time to latest file: rar ch -tl files.rar cw Write archive comment to specified file. It is not able to recompress. comment data will be . It is especially convenient for switches like -av. Comment length is limited to 62000 bytes Examples: rar c distrib.

Examples: 1) rar "ic=first level" -r c:\*.txt 3) rar cw arc d Delete files from archive. k Lock archive. it is possible to use the simplified command syntax i<string> instead of i=<string> It is allowed to specify 't' modifier with other parameters.txt Perform case sensitive search of "first level" string in *. This command will not add new files to the archive. Any command which intends to change the archive will be ignored.txt 2) rar cw -scuc arc unicode. e f i[i c h t]=<string> Find string in archives. h . Supports following optional parameters: i .rar *. Extract files to current directory. the empty archive would removed.case sensitive search. for example. ict=string performs case sensitive search using all mentioned above character tables.rar archives on the disk c: 2) rar ih=f0e0aeaeab2d83e3a9 -r e:\texts Search for hex string f0 e0 ae ae ab 2d 83 e3 a9 in rar archives in e:\texts directory.hexadecimal search.txt files in *. c .use ANSI. . Updates those files changed since they were packed to the archive. t . Please note if the processing of this command results in removing all the files from the archive.sent to stdout. Freshen files in archive. Unicode and OEM character tables (Windows only). Examples: 1) rar cw arc comment.case insensitive search (default). If no parameters are specified.

i. Moving files and directories results in the files and directories being erased upon successful completion of the packing operation. During this stage only the archive structure is reconstructed and it is impossible to recover files which fail the CRC validation.arcname. a new archive will be created.b] List contents of archive [technical]. however. Suspicious entry Name: <possibly filename> Size: <size> Packed: <compressed size> p . Files are listed as with the 'v' command with the exception of the file path. solid flag and old version flag) is displayed when 't' modifier is used. the chance of successful archive reconstruction is very high. r Repair archive. which can be repaired only if recovery record is present. called fixed. You may use this command together with -inul switch to disable all RAR messages and print only file data. Archive repairing is performed in two stages. Print file to stdout.rar l[t. 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. only the file name is displayed.rar.arcname. where 'arcname' is the original archive name.rar.Example: rar k final. First. m[f] Move to archive [files only]. It may be important when you need to send a file to stdout for use in pipes. This stage is never efficient for archives with encrypted file headers. When the second stage is completed. While the recovery is in progress. Modifier 'b' forces RAR to output only bare file names without any additional information. the reconstructed archive will be saved as rebuilt. When this stage has been completed. RAR may prompt the user for assistance when a suspicious file is detected. the damaged archive is searched for a recovery record (see 'rr' command). which were inaccessible due to the broken archive structure. Optional technical information (host OS. where N is number of recovery sectors placed into the archive. Directories will not be removed if 'f' modifier is used and/or '-ed' switch is applied. If the archive contains a recovery record and if the portion of the damaged data is continuous and less than N*512 bytes. Mostly this is useful for non-solid archives.e. to recover undamaged files. it is still possible. where 'arcname' is the original (damaged) archive name.

provided that the damage is not too severe.rar. Optionally.rar. if it is not specified by the user. for example. so you need to be careful to avoid duplicated names.rar rc Reconstruct missing and damaged volumes using recovery volumes (.. You need to specify any existing volume as the archive name. This will cause a small increase of the archive size and helps to recover archived files in case of disk failure or data losses of any other kind.bak will rename all *. The number of sectors may be specified directly in the 'rr' command (N = 1.6% of the total archive size of continuously damaged data. usually allowing the recovery of up to 0.rev files). Such a command is potentially dangerous.bak.. 'rar rc backup.Add it: Yes/No/All Answer 'y' to add this entry to the file rebuilt.txt readme.rar' Read 'rv' command description for information about recovery volumes. Example: rar r buggy.txt info. It is also possible to specify the recovery record size in . redundant information (recovery record) may be added to an archive.bak info.rar readme. 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. rr[N] Add data recovery record. rn Rename archived files.arcname.txt *.txt to info. For example: rar rn data. The command syntax is: rar rn <arcname> <srcname1> <destname1> .rar *.bak in the archive data..part03.txt files to *.bak will rename readme. A recovery record contains up to 524288 recovery sectors. 2 . 524288) or. <srcnameN> <destnameN> For example. the following command: rar rn data. RAR does not check if the destination file name is already present in the archive.txt to readme.bak and info. It is especially important when using wildcards. It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. because a wrong wildcard may corrupt all archived names.

rev files).rev files is less than the number of missing volumes.rar RAR reconstructs missing and damaged volumes either when using 'rc' command or automatically. lock them.rev files . when you posted a multivolume archive to a newsgroup and a part of subscribers did not receive some of the files. This value may be lower in cases of multiple damage. reconstructing is impossible. Each recovery volume is able to reconstruct one missing or damaged RAR volume. If data is damaged continuously. Original RAR volumes must not be modified after creating recovery volumes. Reposting recovery volumes instead of usual volumes may reduce the total number of files to repost.rev files will be equal to this percent taken from the total number of RAR volumes. if it cannot locate the next volume and finds the required number of . so 'rr3p' will work too. The total number of usual and recovery volumes must not exceed 255. rv[N] Create recovery volumes (. For example. you need to use rr3%% instead of rr3%. If the number of . You may also use 'p' instead of '%'. if you have 30 volumes and 3 recovery volumes.cmd file. then each rr-sector helps to recover 512 bytes of damaged information. Recovery algorithm uses data stored both in REV files and in RAR volumes to rebuild missing RAR volumes. because the command processor treats the single '%' character as the start of a batch file parameter. after creating REV files. So if you modify RAR volumes. For example: rar rv3 data. in such case the number of creating .part01.part01. 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.percent to the archive size. The size of the recovery record may be approximately determined by the formula <archive size>/256 + <number of recovery sectors>*512 bytes.bat or . For example: rar rv15% data. Just append the percent character to the command parameter. you are able to reconstruct any 3 missing volumes. 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. recovery process will fail. for example. For example: rar rr3% arcname Note that if you run this command from .rar This feature may be useful for backups or. You may also append a percent character to this parameter.

in the user's home directory. Examples: Test archives in current directory: rar t * or for Unix: rar t '*' User may test archives in all sub-directories. s[name] Convert archive to SFX. original and compressed size.sfx or specified in the switch). Adds files not yet in the archive and updates files that have been changed since they were packed into the archive. writing nothing to the output stream. "Host OS" shows the native operating system of RAR version used to create an archive. Test archive files.exe. For example. last update date and time. file comment. compression ratio. CRC.bad before reconstruction. starting with the current path: rar t -r * or for Unix: rar t -r '*' u Update files in archive. when 't' modifier is used. In the Windows version default. compression method and minimum RAR version required to extract. "Solid" flag is set if file uses the compression statistics from preceding files (see -s switch).part03. sRemove SFX module from the already existing SFX archive. "Old" flag means "Old file version" and indicates if it is the latest or old file version (see -ver switch for details). Original copies of damaged volumes are renamed to *. the original SFX archive is not deleted. Files are listed using the format: full pathname. RAR creates a new archive without SFX module. in order to validate the specified file(s).b] Verbosely list the contents of archive [technical]. t v[t.part03.rar will be renamed to volname.when unpacking. Optional technical information such as "Host OS". . volname. "Solid" and "Old" flags is displayed. The archive is merged with a SFX module (using a module in file default.sfx should be placed in the same directory as the rar. in Unix . attributes.rar. This command performs a dummy file extraction.bad. in /usr/lib or /usr/local/lib.

but this switch creates a separate directory for files unpacked from each archive. The same as when none or an illegal command line option is entered. Example: 1) list contents of system.rar archive (technical mode) and redirect output to file techlist.lst 2) list contents of tutorial.lst rar vt system >techlist. Without '--' switch such a name would be treated as a switch.-c.rar archive (bare file names mode) rar vb tutorial x Extract files with full path. Stop switches scanning This switch tells to RAR that there are no more switches in the command line.dime 10cents. -- -ad . This option may be useful when unpacking a group of archives. use an asterisk ('*') in place of the archive file extension or use the '-v' switch.txt extract specified file to current path. Example: add all files from the current directory to the solid archive '-StrangeName' RAR a -s -. Switches (used in conjunction with a command): -? Display help on commands and switches.-StrangeName -ac Clear Archive attribute after compression or extraction (Windows version only).Modifier 'b' forces RAR to output only bare file names without any additional information. By default RAR places files from all archives in the same directory. AV check and comment show are disabled. if either archive or file name starts from '-' character. It could be useful. To list the contents of all archive volumes. Append archive name to destination path. Example: rar x -av.

Feb. Appends the current date string to an archive name when creating an archive.Example: rar x -ad *.) a week number (a week starts with Monday) day of week number (Monday is 1.7) day of month day of year hours minutes (treated as minutes if encountered after hours) seconds archive number. Depending on the format string and time passed since previous -ag use.rar data\ RAR will create subdirectories below 'data' for every unpacking archive. positions of the date string and base archive name are exchanged. The format string may contain optional text enclosed in '{' and '}' characters. -ag[format] Generate archive name using the current date and time. increments the archive number until generating a unique name. etc. Sunday . This text is inserted into archive name. RAR searches for already existing archive with generated name and if found. The format string may include the following characters: Y M MMM W A D E H M S N year month month name as text string (Jan. 'N' format character is not supported when creating volumes. If you need to update an already existing archive. generated and existing archive names may mismatch. Each of format string characters listed above represents only one character added to archive name. In this case RAR will create a new archive instead of updating the already existing. Examples: 1) use the default YYYYMMDDHHMMSS format . so a date will precede an archive name. For example. Useful for daily backups. use WW for two digit week number or YYYY to define four digit year. Format of the appending string is defined by the optional "format" parameter or by "YYYYMMDDHHMMSS" if this parameter is absent. All other characters are added to an archive name without changes. If the first character in the format string is '+'. be careful with -ag switch.

user.rar a -ag backup 2) use DD-MMM-YY format rar a -agDD-MMM-YY backup 3) use YYYYMMDDHHMM format. system. Example: add all disk C: files with Archive attribute set to the 'f:backup' and clear files Archive attribute rar a -r -ac -ao f:backup c:\*. This switch preserves attributes assigned by operating system to a newly created file. For example. This path is merged to file names when adding files to an archive and removed from file names when extracting. group. include fields description rar a -agYYYY{year}-WW{week}-A{wday} backup 5) use YYYYMMDD and the archive number.txt' to the directory 'DOCS\ENG' of archive 'release'. In Windows it affects archive. in Unix .* -ap Set path inside archive. if you wish to add the file 'readme.* -as Synchronize archive contents . If this switch is used when extracting.txt or to extract 'ENG' to the current directory: rar x -apDOCS release DOCS\ENG\*. It allows to generate unique names even when YYYYMMDD format mask used more than once in the same day rar a -agYYYYMMDD-NN backup -ai Ignore file attributes. you may run: rar a -apDOCS\ENG release readme. place date before 'backup' rar a -ag+YYYYMMDDHHMM backup 4) use YYYY-WW-A format. RAR does not set general file attributes stored in archive to extracted files. and others file permissions. hidden and read-only attributes. -ao Add files with Archive attribute set (Windows version only).

Please contact your local distribution site or the world-wide distribution center. 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.cpp files from directory 'sources'.. RAR will perform integrity validation and display the message: Verifying authenticity information . the operation is performed much faster than the creation of a new archive. In the case of successful authenticity verification. We recommend to use this RAR feature as informational only. the program must be registered. RAR will put. It looks similar to creating a new archive. Avoid it in situations. like a special archive comment. but with one important exception: if no files are modified since the last backup. is being modified and this switch is not specified. Convert file names to lower case. -av-cfg-cl -cu Disable authenticity verification checking or adding. message 'Ok'. message 'FAILED' will be displayed. the authenticity verification information will be removed. those archived files which are not present in the list of the currently added files. When extracting.If this switch is used when archiving. -av Put authenticity verification (registered versions only). testing. It is convenient to use this switch in combination with -u (update) to synchronize contents of an archive and an archiving directory.rar' will contain only *. Ignore configuration file and RAR environment variable. when accurate information about archive creator is important. will be deleted from the archive. Convert file names to upper case. In order to enable the authenticity verification feature. If an archive.cpp the archive 'backup. in every new and updated archive. information concerning the creator. In the case of authenticity verification failure. . containing authenticity verification. after the command: rar a -u -as backup sources\*. listing or updating an archive with the '-av' switch. last update time and archive name. all other files will be deleted from the archive. creator name and last update information will be displayed. For example..

. This option could be dangerous. -dr Delete files to Recycle Bin Delete files after archiving and place them to Recycle Bin. which at the same time is modified by another application. because it allows to archive a file.-c-df Disable comments show. etc. -dh Open shared files Allows to process files opened by other applications for writing. Before deleting file data are overwritten by zero bytes to prevent recovery of deleted files. This switch helps if an application allowed read access to file. so use this switch only if you do not need to preserve such information. so use it carefully. Available in Windows version only. -ee Do not process extended attributes Disables saving and restoring extended file attributes. RAR will not remove empty directories.) will be lost as well. but if all types of file access are prohibited. Delete files after archiving Move files to archive. All attributes of non-empty directories except a name (access rights. Information about empty directories is lost. the file open operation will still fail. When extracting such archives. streams. Wipe files after archiving Delete files after archiving. -ds -dw Do not sort files while adding to a solid archive. This switch in combination with the command "A" performs the same action as the command "M". Only for OS/2 versions. -ed Do not add empty directories This switch indicates that directory records are not to be stored in the created archive. If -ed is used with 'm' command or -df switch. RAR creates non-empty directories basing on paths of files contained in them.

This switch cannot be used with volumes. It allows to skip external data like digital signatures safely. if an archive is transferred between two systems via an unreliable link and at the same time a sender adds new files to it. Do not store the path entered in the command line. RAR adds an "end of archive" block to the end of a new or updated archive. -ep1 -ep2 Expand paths to full.-en Do not add "end of archive" block By default. because the end of archive block contains information important for correct volume processing..\test cd . result in multiple files existing in the archive with the same name. -ep3 . This switch enables files to be added to an archive without including the path information. it may be important to be sure that the already received file part will not be modified on the other end between transfer sessions. Drive separators (colons) are replaced by underscore characters. This switch stores full file paths including the drive letter if used when archiving. but the path in archived names will not include 'tmp\' rar a -ep1 -r test tmp\* This is equivalent to the commands: cd tmp rar a -r . -ep Exclude paths from names. This could. Store full file paths (except a drive letter and leading path separator) when archiving. but in some special cases it may be useful to disable this feature. If you use -ep3 when extracting. Exclude base dir from names. Example: all files and directories from the directory tmp will be added to the archive 'test'. of course. Windows version only. If the user also specified a destination path. it will change underscores back to colons and create unpacked files in their original directories and disks. Expand paths to full including the drive letter. For example. it will be ignored.. It also converts UNC paths from \\server\share to __server\share when archiving and restores them to the original state when extracting.

But be cautious and use -ep3 only if you are sure that extracting archive does not contain any malicious files. you may run: rar a -ep3 -r backup.rar to restore it. H. hidden. octal (with leading '0') or hex (with leading '0x') format. -e[+]<attr> Specifies file exclude or include attributes mask. It is allowed to specify both -e<attr> and -e+<attr> in the same command line. A and R instead of a digital mask to denote directories and files with system. without '+' sign before <attr>. <attr> is a number in the decimal. By default.This switch can help to backup several disks to the same archive. Examples: 1) archive only directory names without their contents rar a -r -e+d dirs 2) do not compress system and hidden files: rar a -esh files 3) do not extract read-only files: rar x -er files . it specifies the include mask. The order in which the attributes are given is not significant. S. Unix version supports D and V symbols to define directory and device attributes. For example. If '+' sign is present.rar c:\ d:\ e:\ to create backup and: rar x -ep3 backup. In other words. this switch defines the exclude mask. Only those files which have at least one attribute specified in the mask will be processed. In Windows version is also possible to use symbols D. 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. file would not be processed. archive and read-only attributes. So if result of bitwise AND between <attr> and file attributes is nonzero. use it if you have created an archive yourself or completely trust its author.

Switch -idd disables "Done" string at the end of operation.q] Disable messages. If you append a dot character to -ieml.rar using the password 'fGzq5yKw' -id[c. It is allowed to use several modifiers at once. . Switch -idc disables the copyright string. attributes. then only replaced with new versions extracted from the -hp[p] Encrypt both file data and headers. an archive will be deleted after it was successfully attached to an email. If the switch is used when creating a multivolume archive. Attach an archive created or updated by the add command to email message. May The command string could also use the the switch '-f' is old files would be archive. so switch -idcdp is correct. You may enter a destination email address directly in the switch or leave it blank. If used with the commands 'x' or 'e'.txt to the encrypted archive secret. You need to have a MAPI compliant email client to use this switch (most modern email programs support MAPI interface).p.d. every volume is attached to a separate email message. Example: rar a -hpfGzq5yKw secret report. This switch is similar to -p[p]. This switch encrypts all sensitive archive areas including file data. Switch -idp disables the percentage indicator. you switch '-f' with the commands 'm' or 'mf'. Windows version only. be used with archive extraction or creation. but switch -p encrypts only file data and leaves other information like file names visible. Without a password it is impossible to view even the list of files in archive encrypted with -hp. In the latter case you will be asked for it by your email program. comments and other blocks.][addr] Send archive by email.-f Freshen files. It is possible to specify several addresses separated by commas or semicolons. file names. "a -f" is equivalent to the command 'f'. sizes.txt will add the file report. -ieml[. Switch -idq turns on the quiet mode. so only error messages and questions are displayed. so it provides a higher security level.

Enable sound. Example: rar a -ilogc:\log\backup. Windows version only. Keep broken extracted files. -ilog[name] Log errors to file (registered version only). -inul -ioff Disable all messages. by default. Turn PC off after completing an operation.log backup d:\docs will create c:\log\backup. the log file is created using the following defaults: Unix: . but slowest) -isnd -k -kb If this switch is not specified. RAR.rarlog file in the user's home directory. The switch -kb specifies that files with CRC errors should not be deleted. Write error messages to rar. deletes files with CRC errors after extraction. RAR uses -m3 method .log log file in case of errors. Include both path and name to 'name' parameter if you wish to change the location of log file.log file in %APPDATA%\WinRAR directory.-ierr Send all messages to stderr. -m<n> -m0 -m1 -m2 -m3 -m4 -m5 Set compression method: store fastest fast normal good best do not compress file when adding to archive use fastest method (less compressive) use fast compression method use normal (default) compression method use good compression method (more compressive.log file. RAR will create the log file in default directory from the list above using the specified name. but slower) use best compression method (slightly more compressive. Lock archive. Windows: rar. Any command which intends to change the archive will be ignored. The hardware must support the power off feature. If 'name' parameter includes a file name without path. If optional 'name' parameter is not specified.

. delta compression: <Param1> is a number of byte channels (can be 1 . <Param2> is ignored. It may have the following values: A C D E I T audio compression.(normal compression). true color (RGB) data compression. Audio compression. It has the following syntax: -mc[param1][:param2][module][+ or -] where <module> is the one character field denoting a part of the compression algorithm. 64-bit Intel Itanium executables compression. true color (RGB) data compression: .disables all optional modules and allows only the general compression algorithm. advanced algorithms like audio and true color processing are enabled only in -m3. text compression. RAR will choose modules automatically. Please note that improper use of this switch may lead to very serious performance and compression loss. Switch -mc. 32-bit x86 Intel executables compression. RAR splits multibyte channels to bytes. which has to be configured. so use it only if you clearly understand what you do. This switch is intended mainly for benchmarking and experiments. '-' disables the module at all. -mc<par> Set advanced compression parameters. <Param1> and <Param2> are module dependent parameters described below.-m5. the advanced text compression is activated only in -m4. based on data and the current compression method. 32-bit x86 executables compression. RAR uses only the general compression algorithm in -m1 and -m2 methods.. 64-bit Intel Itanium executables compression.-m5 modes. delta compression. This default can be overridden using -mc switch. If no sign is specified. '+' sign at the end of switch applies the selected algorithm module to all processed data. By default.31). In the real environment it is usually better to allow RAR to select optimal parameters automatically. two 16-bit audio channels are considered by RAR as four channels one byte each. for example.

'd'. Decompression will be still possible using virtual memory. 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. RAR can reduce the dictionary size if it is significantly larger than the size of the source data.-mcd.asm or . decrease packing speed and increase memory requirements. other people may have problems when decompressing it on a computer with less memory installed. 'g' respectively. but note that PPM uses the equal memory size both to compress and decompress. 'e'. -md<n> Select dictionary size <n> in KB. but only if enough memory is available to PPM. sets the compression order to 10 and allocates 40 MB memory. 256. Usually a higher value slightly increases the compression ratio of redundant data. <Param2> is memory in megabytes allocated for PPM (1-128). 'c'.disable text and delta compression. 128. In case of lack of memory the result may be negative. so if you allocate too much memory when creating an archive. The sliding dictionary is a special memory area used by the compression algorithm.63).<Param1> and <Param2> are ignored. when the text compression is used. Text compression: <Param1> is the order of PPM algorithm (can be 2 . 4) switches -mct. Examples: 1) switch -mc1a+ forces use of 8-bit mono audio compression for all data. 3) switch -mc12t sets the text compression order to 12. 512. Higher order values decrease both compression and decompression speed. 'f'. but it may become very slow. 'b'. then increasing the dictionary size will generally increase compression ratio. Higher values may increase the compression ratio. but leaves to RAR to decide when to use it. It helps to reduce memory requirements without decreasing compression. Example: RAR a -s -mdd sources *. 2) switch -mc10:40t+ forces use of text compression algorithm for all data. 2048 or 4096 or a letter 'a'. Must be 64. 1024. Default sliding dictionary size is 4096 KB.

tgz. Optional <list> parameter defines the list of file extensions separated by semicolons. -ms switch will use the default set of extensions. RAR will use the multithreaded version of compression algorithm providing higher speed on multiprocessor architectures. 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. This switch does not replace usual file masks. arj. z. lha. -msrar.RAR a -s -md512 sources *. so -ms*. You may specify the switch '-n' several times.zip. If <list> is not specified. It is an additional filter limiting processed files only to those matching the include mask specified in -n switch. If it is greater than 0.jpg will work too. which will be stored without compression. zip -mt<threads> Set the number of threads. . It is also allowed to specify wildcard file masks in the list. rar. -n<f> Include only the specified file <f>. ace. which still need to be entered in the command line. It can help to reduce the command line length sometimes.*. RAR will use the single threaded compression algorithm. Specify file types. -ms[list] Specify file types to store. Wildcards may be used both in the name and file parts of file mask. For example. which helps to increase archiving speed without noticeable loss in the compression ratio. lzh.jpg will force RAR to store without compression all RAR and ZIP archives and JPG images.zip. If -mt switch is not specified. bz2. If <threads> is zero. <threads> parameter can take values from 0 to 16.rar. Available in Windows version only. gz. mp3.asm Will create a solid archive using a 512 KB dictionary.*. This switch may be used to store already compressed files. It defines the recommended number of active threads for compression algorithm. RAR will try to detect the number of available processors and select the optimal number of threads automatically. jpg. taz. which includes the following file types: 7z. Real number of active threads can differ from the specified. cab. jpeg.

It is especially important in Windows 2000. Windows version only.lst text Project Info -n@<lf> Include files listed in the specified list file. but only if you have necessary privileges to read them. Renamed file will get the name like 'filename(N). Example: rar a -r -n@inclist. Windows version only. which use streams to keep some file dependent information like file descriptions. it will read file names from stdin. This switch allows to restore NTFS Compressed attribute when extracting files.txt -n*.txt and *. but reads include masks from the list file. This switch has meaning only for NTFS file system and allows to save alternative data streams associated with a file.txt Project\*. XP and newer. if you need to compress all *. If you use RAR to backup your NTFS disks. but does not restore them unless -oc switch is specified. Note that only NTFS file system supports file based security under Windows.txt' is the original file name and 'N' is a number starting from 1 and incrementing if file exists. file permissions and audit information. where 'filename. -or -os .txt Info\*. Unix version only. Save NTFS streams. you can enter: rar a -r text Project\*. Rename extracted files automatically if file with the same name already exists. group.txt'.For example. RAR saves Compressed file attributes when creating an archive.txt text Project Info -oc Set NTFS Compressed attribute. Unix RAR version saves file owner and group when using this switch. -ow Use this switch when archiving to save file security information and when extracting to restore it. Windows version stores owner.lst files in directories Project and Info.lst or using the switch -n: rar a -r -n*. If you use -n@ without the list file name parameter. -ol Save symbolic links as the link instead of the file. Similar to -n<f> switch.lst Info\*. it is recommended to specify this switch.

l. If you specify a directory name when archiving and if such name does not include wildcards. Can be used both when extracting and updating archived files. by default RAR adds the directory contents even if switch -r is not specified.txt add files *. If you omit the password on the command line. The password is case-sensitive. e. Example: rar a -pmyhoney secret1 *.-o[+ -] Set the overwrite mode. e. Switch -r.arc c:\ . 'f'. l.prohibits it. u. x. 'u'. When used with the commands x. For example: rar a -r. cf and s.arc dirname command will add only the empty 'dirname' directory and ignore its contents. When used with the commands 'a'. May be used with commands: a. Even without -r switch RAR can enable the recursion automatically in some situations. t. p. -r- Disable recursion. Switch -rdisables such behavior. -p-r Do not query password Recurse subdirectories. f. c. v. Following command: rar a -r. cf or s will process all archives in sub-directories as well as the current working directory. v. t. p. Also RAR automatically enables the recursion if disk root without wildcards is specified as a file mask. Encrypt files with the string <p> as password while archiving.txt and encrypt them with password "myhoney". 'm' will process files in all sub-directories as well as the current working directory. you will be prompted with message "Enter password". Following modes are available: -o -o+ -o-p[p] Ask before overwrite (default for extracting files). Skip existing files. Overwrite all (default for updating archived files). m. c.

This switch is used when creating a multivolume archive to generate recovery volumes. as one continuous data stream. But it also has a few important disadvantages: slower updating of existing solid archives.lst. <p> equal to 1 sets the lowest possible priority. Available only in RAR for Windows.rar with 512 KB dictionary. 15 . Non-zero <s> may be useful if you need to reduce system load even more than can be achieved with <p> parameter. which include wildcard characters '*' and '?' -ri<p>[:<s>] Set priority and sleep time. This switch regulates system load by RAR in multitasking environment. which treats several or all files. See the 'rr[N]' command description for details.15. This is a period of time that RAR gives back to the system after every read or write operation while compressing or extracting. 'f'. but when used with the commands 'a'. slower access to individual files. recursing all directories. -r0 Similar to -r. 'u'.* -rr[N] Add a data recovery record. similar files. . Example: create solid archive sources. A solid archive is an archive packed by a special compression method. lower damage resistance.will compress contents of root c: directory only and will not recurse into subdirectories. See the 'rv[N]' command description for details. RAR uses the default task priority. -s Create solid archive. Example: execute RAR with default priority and 10 ms sleep time: rar a -ri0:10 backup *. This switch is used when creating or modifying an archive to add a data recovery record to the archive. Solid archiving significantly increases compression. Usually files in a solid archive are sorted by extension. within the archive. -rv[N] Create recovery volumes. Sleep time <s> is a value from 0 to 1000 (milliseconds). rarfiles. If <p> is 0. Possible task priority <p> values are 0 . 'm' will recurse subdirectories only for those names.the highest possible. when adding a large number of small. But it is possible to disable sorting with -ds switch or set an alternative file order using a special file. starting with the current directory.

OEM (DOS) encoding.comment files. 'Objects' parameter is optional and can have one of the following values: L . but resets solid statistics if file extension is changed. 'Charset' parameter is mandatory and can have one of the following values: U . A . -sc<charset>[objects] Specify the character set for list files and archive comment files. C .txt data Read comment.list files.Add only . It is allowed to specify more than one object. list files and comment files written by "cw" command.asm files: rar a -s -md512 sources. otherwise RAR will ignore this switch and process the file as ASCII text.txt as Unicode file. This switch allows to specify the character set for files in -z[file] switch. Windows version only. Usually decreases compression. 2) rar c -scuc -zcomment. but also . If 'objects' parameter is missing. 3) rar cw -scuc data comment. Windows version only.Unicode. but resets solid statistics after compressing <N> files. for example. Files in Unicode format must have FFFE or FEFF Unicode character in the beginning. Examples: 1) rar a -scol data @list Read names contained in 'list' using OEM encoding.ANSI (Windows) encoding.rar *. -se Create solid groups using extension Similar to -s.asm -r -s<N> Create solid groups using file count Similar to -s. but also decreases losses in case of solid archive damages. Usually decreases compression. 'charset' is applied to all objects.txt Write comment.txt as Unicode file. O . -scolc.

but only if enough data was packed after a previous reset (at least a few megabytes). It decreases compression.Far' output as 'Tree.sfx myinst create SelF-eXtracting (SFX) archive using wincon. in /usr/lib or /usr/local/lib.sfx should be placed in the same directory as the rar. Example: rar a -sfxwincon. This switch cannot be used with -v. in Unix . In the Windows version default. -sm<size> Process only those files. a Self-Extracting archive (using a module in file default. If this switch is used when creating a new archive. Optional 'name' parameter allows to specify a file name of compressed stdin data in the created archive.sfx SFX-module. -si[name] Read data from stdin (standard input). This switch forces RAR to ignore packed data size and attempt to reset statistics for volumes of any size. -sv Create independent solid volumes By default RAR tries to reset solid statistics as soon as possible when starting a new volume. Parameter <size> must be specified in bytes. If this parameter is missing.rar will compress 'type Tree. which size is more than specified in <size> parameter of this switch.sfx or specified in the switch) would be created. when creating an archive. For example. but increases chances to extract a part of data if one of several solid volumes in a volume set was lost or damaged.Far tree. -sl<size> Process only those files.Far' file. Note that sometimes RAR cannot reset statistics even using this switch. the name will be set to 'stdin'. Parameter <size> must be specified in bytes. -sfx[name] Create SFX archives. it cannot be done when .in the user's home directory.exe. which size is less than specified in <size> parameter of this switch.Far rar a -siTree.decreases losses from solid archive damages. Example: type Tree.

It slightly increases compression. It is allowed to insert separators like '-' or ':' to the date string and omit trailing fields. but not inside of single file. RAR is able to reset solid statistics only between separate files. -tk Keep original archive date. Format of the time string is: [<ndays>d][<nhours>h][<nminutes>m][<nseconds>s] For example. but significantly reduces chances to extract a part of data if one of several solid volumes in a volume set was lost or damaged. -s-t Disable solid archiving Test files after archiving. . Set archive time to newest file. Format of the switch is the same as -ta<date>. -tb<date> Process only files modified before the specified date. Ignored if used when creating a non-volume archive. so files will be deleted only if the archive had been successfully tested.compressing one large file split between several volumes. use switch -tn15d to process files newer than 15 days and -tn2h30m to process files newer than 2 hours 30 minutes. Prevents RAR from modifying the archive date when changing an archive. Format of the date string is YYYYMMDDHHMMSS. -svCreate dependent solid volumes Disables to reset solid statistics between volumes. Ignored if used when creating a non-volume archive. Forces RAR to set the date of a changed archive to the date of the newest file in the archive. 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". -tl -tn<time> Process files newer than the specified time period. For example. This switch is especially useful in combination with the move command. -ta<date> Process only files modified after the specified date.

so modification time is stored with the high precision and other times are ignored. Use -ts. Switch -tsm instructs RAR to save file modification time. 2 . 3 . Examples: 1) rar a -ts backup Store all file times with the highest possible precision. 3) rar a -tsm1 -tsc1 backup . For example. It is in Unix. even if archive contains creation and last access time.last access time. which is equal to 0. access).0. RAR automatically reduces if high mode is not supported by the file not more than 2 seconds on FAT and 1 second time precision is 0. Value '1' enables 1 second precision.a>[N] Save or restore file time (modification. -ts<m. Setting the modification time to unpacked files may be also disabled with -tsm-. up to 19 additional bytes per file in case of -tsm4 -tsa4 -tsc4 combination.0. but must not be 0).c.-to<time> Process files older than the specified time period. Windows allows to set all three times. Switch -tsm is not required. creation.0000001 sec. because RAR uses it by default.0065536 sec. Default RAR mode is -tsm4 -tsc0 -tsa0. -tsc . but not creation.0000256 sec and 4 or '+' enables the maximum NTFS time precision. Higher precision modes add more data to archive. 2) rar x -tsa backup Restore modification and last access time. Format of the switch is the same as -tn<time>. If no precision is specified. By default RAR sets only the modification time.to save only the low precision modification time or to ignore all three file times on unpacking. When creating the precision system.creation time and tsa . NTFS an archive. Optional parameter after the switch is the number between 0 and 4 controlling the file time precision. Unix .0000001 second. It is necessary to specify -tsc and -tsa switches to set creation and access time when unpacking files (precision is irrelevant. Value '0' or '-' means that creation and access time are not saved and low (two seconds) precision is used for modification time. It is possible to omit the time type letter if you need to apply the switch to all three times. -ts+ or -ts. RAR uses '4' (high) value.modification and last access. -tsm4 -tsa4 -tsc4 can be replaced by -ts4. Operating systems limit which time can be set on unpacking.

megabytes .'M'. the user will be prompted with: Create next volume: Yes/No/All At this moment in time. You may also enter the size in kilobytes using the symbol 'k'. . first case it enables volume size autodetection. 1440 or 2880 and replaced with corresponding floppy disk size. Create volumes with size autodetection or list all volumes This switch may be used when creating or listing volumes. You may specify several -v switches to set different sizes for different volumes. Predefined values can be 360. If volumes are created on removable media. If the size is omitted. millions of bytes . 1200. you could also use the switch '-u' with the commands 'm' or 'mf'. volumes will use all available space on the destination It is convenient when creating volumes on removable You may read more about volumes in -v<size> description.Store low precision modification and creation time.'G' or select one of several predefined values using the symbol 'f' following the numerical value. in bytes using the symbol 'b'. when this switch is used together with 'V' or 'L' command. -u Update files. -v In the second case. Answering 'A' will cause all volumes to be created without a pause. The command string "a -u" is equivalent to the command 'u'. In the so new media. For example: rar a -v100k -v200k -v300k arcname sets 100 KB size for first volume. disks. it forces RAR to list contents of all volumes starting from that specified in the command line. then after the creation of the first volume. you should change the disks. -v<size>[k b f m M g G] Create volumes with size=<size>*1000 [*1024 *1]. gigabytes . 200 KB for second and 300 KB for all following volumes. Without -tsm1 RAR would save the high precision modification time. autodetection will be used. By default this switch uses <size> as thousands (1000) of bytes (not 1024 x bytes). Without this switch RAR displays contents of only one single specified volume.'g'. 720. If the switch '-u' is used with the commands 'x' or 'e'. billions (milliards) of bytes .'m'. May be used with archive extraction or creation. then files not present on the disk and files newer than their copies on the disk would extracted from the archive.

the next volume is not found and volumes are placed on the non-removable disk. the hard disk cannot be erased using this switch. could be greater than its uncompressed size. when unpacking an archive without the switch -ver. Example: create archive in volumes of fixed size: rar a -s -v1440 floparch.n'. including a version. 'u'.rar. the name of which does not include a numeric suffix.r99. When extracting or testing a multi-volume archive you must use only the first volume name. RAR extracts only the last added file version.partNNN. the user will be prompted with: Insert disk with <next volume name> Insert the disk with the correct volume and press any key. The switch applies only to removable media. The command 'a' may be used only for the creation of a new multi-volume sequence.* will create solid volumes of size 1440000 bytes. -ver[n] File version control Forces RAR to keep previous file versions when updating files in the already existing archive. -vd Erase disk contents before creating volume All files and directories on the target disk will be erased when '-vd' is used. The commands 'd'. Using -vn switch it is possible to switch to another.rar *. that the file size. It is possible. where 'n' is the version number. If while extracting. where NNN is the volume number.r00 to . RAR will abort with the error message: Cannot find <volume name> Archive volumes may not be modified. This is due to the fact that 'storing' (no compression if size increases) cannot be enabled for multi-volume sets. But if you specify a file name exactly. Such an archive should be created using both the '-v' and '-sfx' switches. 's' cannot be used with Multi-volume sets. Old versions are renamed to 'filename. 'f'.rar'. Archive volumes may be Self-Extracting (SFX). By default. extension based naming scheme.By default RAR volumes have names like 'volname. following volumes are numbered from . although unlikely. of a file in a multi-volume set. it will be also . If there is no next volume on the drive and the disk is removable. where the first volume file in a multi-volume set has the extension .

-w<p> Assign work directory as <p>. you can use "path\filename" syntax to exclude only this copy of "filename".r99. Using -vn switch it is possible to switch to another. If mask contains wildcards. If you specify 'n' parameter when archiving.txt. RAR will extract all versions of all files that match the entered file mask. -vp Pause before each volume By default RAR asks for confirmation before creating or unpacking next volume only for removable disks. Wildcards can be used in both the name and path parts of file mask.txt. "path" must be the path inside of archive. In this case a version number is not removed from unpacked file names. so "filename" mask will exclude 'filename' file only in current directory when archiving or in root archive directory when extracting.rar. For example. This switch forces RAR to ask such confirmation always. Exclude the specified <f> file or directory. where NNN is the volume number. If you know the exact path to file. For example. following volumes are numbered from . if it is present in the archive.5' will unpack 'file. This switch may be used to assign the directory for temporary files. 'rar x -ver5 arcname' will unpack only 5th file versions. it applies to files in current directory and its subdirectories. If you use -xpath\filename syntax when unpacking an archive. You can specify the switch '-x' several times to define several exclusion masks in the same command line. where the first volume file in a multi-volume set has the extension . extension based naming scheme.5'.r00 to . Old file versions exceeding this threshold will be removed. If you specify -ver switch without a parameter when unpacking. It can be useful if disk space is limited and you wish to copy each volume to another media immediately after creation.unpacked.partNNN. -vn Use the old style volume naming scheme By default RAR volumes have names like 'volname. You may also extract a concrete file version specifying its number as -ver parameter. It is not recursive without wildcards.rar'. Use "*\filename" syntax to exclude "filename" recursively in all directories. 'rar x arcname' will unpack only last versions. it will limit the maximum number of file versions stored in the archive. not the file path on the disk after -x<f> . when 'rar x arcname file. It will tell RAR to unpack only this version and remove a version number from file names.

3) rar x -x*. comment is read from stdin. masks containing wildcards are applied only to files. Read archive comment from file <f>. If you need a mask with wildcards to exclude several directories.jpg -x*. In this case you do not need to append the path separator to mask.jpg and *.txt arch *. "*tmp*\" mask will exclude all directories matching "*tmp*" and "*\tmp\" will exclude all 'tmp' directories.txt docs extract all files except *. specify the exact name of directory including the absolute or relative path without any wildcards. By default. . which is required only for directory exclusion masks containing wildcards to distinguish them from file exclusion masks. 2) rar a -r -x*\temp\ savec c:\* compress all files on the disk c: except 'temp' directories and files inside of 'temp' directories.txt from docs. use the special syntax for directory exclusion masks.exe -y -z[f] Assume Yes on all queries. Maximum archive comment length is 62000 bytes.rar. If you use -x@ without the list file name parameter.unpacking.avi in current directory and its subdirectories. Example: rar a -x@exlist. If <f> is not specified. Limitations ~~~~~~~~~~~ Pathname is limited to 259 symbols. Such masks must have the trailing path separator character ('\' for Windows and '/' for Unix). -x@<lf> Exclude files listed in the specified list file. If you wish to exclude only one directory. Use with -sc switch if you need to specify the character set for comment text file.avi rawfiles compress all files except *. For example. both masks will be applied to contents of current directory and all its subdirectories. Since wildcards are present. it will read file names from stdin. Examples: 1) rar a -r -x*.

Solid . Non-zero exit code indicates some kind of error: 0 1 2 3 4 5 6 7 8 9 10 255 Glossary ~~~~~~~~ Archive Special file containing one or more files optionally compressed and/or encrypted. Non fatal error(s) occurred. only to create a new one. Particularly advantageous when packing a large number of small files. Create file error No files matching the specified mask were found.'c'. A fatal error occurred. (SelF-eXtracting module).'cf' will not operate with archive volumes. Not enough memory for operation. Invalid CRC32 control sum.'u'. SUCCESS WARNING FATAL ERROR CRC ERROR LOCKED ARCHIVE WRITE ERROR OPEN ERROR USER ERROR MEMORY ERROR CREATE ERROR NO FILES ERROR USER BREAK Successful operation. User stopped the process Compression A method of encoding data to reduce it's size. Data is damaged. CRC SFX Cyclic Redundancy Check. Write to disk error. The command 'a' cannot be used to update an archive volume. An archive packed using a special compression method which sees all files as one continuous data stream.Command limitations: The commands 'd'. Archive module used to extract files from when executed.EXE file. usually in the form of a . Exit values ~~~~~~~~~~~ RAR exits with a zero code (0) in case of successful operation. Mathematical method calculating special checking information for data validity. Open file error. Attempt to modify an archive previously locked by the 'k' command.'f'. Command line option error.

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. Copyrights (c) 1993-2011 Alexander Roshal .

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->