📄 rar.txt
字号:
Example: rar a -sfxwincon.sfx myinst create SelF-eXtracting (SFX) archive using wincon.sfx SFX-module. -si[name] Read data from stdin (standard input), when creating an archive. Optional 'name' parameter allows to specify a file name of compressed stdin data in the created archive. If this parameter is missing, the name will be set to 'stdin'. This switch cannot be used with -v. Example: type Tree.Far | rar a -siTree.Far tree.rar will compress 'type Tree.Far' output as 'Tree.Far' file. -sl<size> Process only those files, which size is less than specified in <size> parameter of this switch. Parameter <size> must be specified in bytes. -sm<size> Process only those files, which size is more than specified in <size> parameter of this switch. Parameter <size> must be specified in bytes. -sv Create independent solid volumes By default RAR tries to reset solid statistics as soon as possible when starting a new volume, but only if enough data was packed after a previous reset (at least a few megabytes). This switch forces RAR to ignore packed data size and attempt to reset statistics for volumes of any size. It decreases compression, but increases chances to extract a part of data if one of several solid volumes in a volume set was lost or damaged. Note that sometimes RAR cannot reset statistics even using this switch. For example, it cannot be done when compressing one large file split between several volumes. RAR is able to reset solid statistics only between separate files, but not inside of single file. Ignored, if used to create non-volume archive. -sv- Create dependent solid volumes Disables to reset solid statistics between volumes. It slightly increases compression, but significantly reduces chances to extract a part of data if one of several solid volumes in a volume set was lost or damaged. Ignored, if used to create non-volume archive. -s- Disable solid archiving -t Test files after archiving. This switch is especially useful in combination with the move command, so files will be deleted only if the archive had been successfully tested. -ta<date> Process only files modified after the specified date. Format of the date string is YYYYMMDDHHMMSS. It is allowed to insert separators like '-' or ':' to the date string and omit trailing fields. For example, the following switch is correct: -ta2001-11-20 Internally it will be expanded to -ta20011120000000 and treated as "files modified after 0 hour 0 minutes 0 seconds of 20 November 2001". -tb<date> Process only files modified before the specified date. Format of the switch is the same as -ta<date>. -tk Keep original archive date. Prevents RAR from modifying the archive date when changing an archive. -tl Set archive time to newest file. Forces RAR to set the date of a changed archive to the date of the newest file in the archive. -tn<time> Process files newer than the specified time period. Format of the time string is: [<ndays>d][<nhours>h][<nminutes>m][<nseconds>s] For example, use switch -tn15d to process files newer than 15 days and -tn2h30m to process files newer than 2 hours 30 minutes. -to<time> Process files older than the specified time period. Format of the switch is the same as -tn<time>. -ts<m,c,a>[N] Save or restore file time (modification, creation, access). 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. Default RAR mode is -tsm4 -tsc0 -tsa0, so modification time is stored with the high precision and other times are ignored. 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-. 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. 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. 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. Examples: 1) rar a -ts backup Store all file times with the highest possible precision. 2) rar x -tsa backup Restore modification and last access time. Switch -tsm is not required, because RAR uses it by default. 3) rar a -tsm1 -tsc1 backup Store low precision modification and creation time. Without -tsm1 RAR would save the high precision modification time. -u Update files. May be used with archive extraction or creation. 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. -v Create volumes with size autodetection or list all volumes This switch may be used when creating or listing volumes. 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. 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. -v<size>[k|b|f|m|M|g|G] 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. If the size is omitted, autodetection will be used. You may specify several -v switches to set different sizes for different volumes. For example: rar a -v100k -v200k -v300k arcname sets 100 KB size for first volume, 200 KB for second and 300 KB for all following volumes. If volumes are created on removable media, then after the creation of the first volume, the user will be prompted with: Create next volume: Yes/No/All At this moment in time, you should change the disks. Answering 'A' will cause all volumes to be created without a pause. 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. 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: Insert disk with <next volume name> Insert the disk with the correct volume and press any key. 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: Cannot find <volume name> 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. 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. Archive volumes may be Self-Extracting (SFX). Such an archive should be created using both the '-v' and '-sfx' switches. Example: create archive in volumes of fixed size: rar a -s -v1440 floparch.rar *.* will create solid volumes of size 1440000 bytes. -vd Erase disk contents before creating volume 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. -ver[n] File version control 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. 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. 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. 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. -vn Use the old style volume naming scheme 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. -vp Pause before each volume By default RAR asks for confirmation before creating or unpacking next volume only for removable drives. 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. -w<p> Assign work directory as <p>. This switch may be used to assign the directory for temporary files. -x<f> Exclude specified file <f>,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -