📄 rar.txt
字号:
as the archive name, for example, 'rar rc backup.part03.rar' Read 'rv' command description for information about recovery volumes. rn Rename archived files. The command syntax is: rar rn <arcname> <srcname1> <destname1> ... <srcnameN> <destnameN> For example, the following command: rar rn data.rar readme.txt readme.bak info.txt info.bak will rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar. It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. For example: rar rn data.rar *.txt *.bak will rename all *.txt files to *.bak. 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. rr[N] Add data recovery record. Optionally, redundant information (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. 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. 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: rar rr3% arcname 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. 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. The size of the recovery record may be approximately determined by the formula <archive size>/256 + <number of recovery sectors>*512 bytes. rv[N] Create recovery volumes (.rev files), which can be later used to reconstruct missing and damaged files in a volume set. This command makes sense only for multivolume archives and you need to specify the name of the first volume in the set as the archive name. For example: rar rv3 data.part01.rar 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. 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. 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. 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: rar rv15% data.part01.rar 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. Original copies of damaged volumes are renamed to *.bad before reconstruction. For example, volname.part03.rar will be renamed to volname.part03.rar.bad. s[name] Convert archive to SFX. The archive is merged with a SFX module (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. s- Remove SFX module from the already existing SFX archive. RAR creates a new archive without SFX module, the original SFX archive is not deleted. t Test archive files. This command performs a dummy file extraction, writing nothing to the output stream, in order to validate the specified file(s). Examples: Test archives in current directory: rar t * or for Unix: rar t '*' User may test archives in all sub-directories, starting with the current path: rar t -r * or for Unix: rar t -r '*' u Update files in archive. Adds files not yet in the archive and updates files that have been changed since they were packed into the archive. v[t,b] Verbosely list the contents of archive [technical]. 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. Optional technical information (host OS, solid flag and old file version flag) is displayed when 't' modifier is used. Modifier 'b' forces RAR to output only bare file names without any additional information. To list the contents of all archive volumes, use an asterisk ('*') in place of the archive file extension or use the '-v' switch. Example: 1) list contents of system.rar archive (technical mode) and redirect output to file techlist.lst rar vt system >techlist.lst 2) list contents of tutorial.rar archive (bare file names mode) rar vb tutorial x Extract files with full path. Example: rar x -av- -c- dime 10cents.txt extract specified file to current path. AV check and comment show are disabled. Switches (used in conjunction with a command): -? Display help on commands and switches. The same as when none or an illegal command line option is entered. -- Stop switches scanning 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. Example: add all files from the current directory to the solid archive '-StrangeName' RAR a -s -- -StrangeName -ac Clear Archive attribute after compression or extraction (Windows version only). -ad Append archive name to destination path. 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. Example: rar x -ad *.rar data\ RAR will create subdirectories below 'data' for every unpacking archive. -ag[format] Generate archive name using the current date and time. Appends the current date string to an archive name when creating an archive. Useful for daily backups. 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: Y - year M - month MMM - month name as text string (Jan, Feb, etc.) W - a week number (a week starts with Monday) A - day of week number (Monday is 1, Sunday - 7) D - day of month E - day of year H - hours M - minutes (treated as minutes if encountered after hours) S - seconds N - archive number. RAR searches for already existing archive with generated name and if found, increments the archive number until generating a unique name. 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. 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. The format string may contain optional text enclosed in '{' and '}' characters. This text is inserted into archive name. All other characters are added to an archive name without changes. 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. Examples: 1) use the default YYYYMMDDHHMMSS format rar a -ag backup 2) use DD-MMM-YY format rar a -agDD-MMM-YY backup 3) use YYYYMMDDHHMM format, place date before 'backup' rar a -ag+YYYYMMDDHHMM backup 4) use YYYY-WW-A format, include fields description rar a -agYYYY{year}-WW{week}-A{wday} backup 5) use YYYYMMDD and the archive number. It allows to generate unique names even when YYYYMMDD format mask used more than once in the same day rar a -agYYYYMMDD-NN backup -ao Add files with Archive attribute set (Windows version only). 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:\*.* -ap Set path inside archive. This path is merged to file names when adding files to an archive and removed from file names when extracting. For example, if you wish to add the file 'readme.txt' to the directory 'DOCS\ENG' of archive 'release', you may run: rar a -apDOCS\ENG release readme.txt or to extract 'ENG' to the current directory: rar x -apDOCS release DOCS\ENG\*.* -as Synchronize archive contents 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. For example, after the command: rar a -u -as backup sources\*.cpp the archive 'backup.rar' will contain only *.cpp files
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -