rar(1) archive files with compression


rar <command> [-<switch 1> -<switch N>] archive [files...]


This manual page documents briefly the rar archiver.
This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page.
Commands and options described here are as of rar 3.0b5.

rar and unrar are programs for manipulation with .rar archives.


After the program name comes a command and then optional switches with dashes before them.
A summary of commands is included below. For a complete description, run rar without options.
Add files to archive.
Add archive comment. Comment length is limited to 62000 bytes.
Add files comment. File comments are displayed when the 'v' command is given. File comment length is limited to 32767 bytes.
Write archive comment to a specified file.
Delete files from archive.
Extract files to current directory. Does not create any subdirectories.
Freshen files in archive. Updates those files changed since they were packed to the archive. This command will not add new to the archive.
Lock archive. Any command which intend to change the archive will be ignored.
List content of archive [technical]. Files are listed as the 'v' command with the exception of the file path. i.e. the file name is displayed. Optional technical information displayed when 't' modifier is used.
Move to archive [files only]. Directories will not be removed if 'f' modifier is used and/or '-ed' switch is applied.
Print file to stdout.
Repair archive. For further details look in rar.txt.
Reconstruct missing volumes using recovery volumes (.rev files). You need to specify any existing volume as the archive name, for example, 'rar rc backup.part03.rar'.
Add data recovery record. Optionally, redundant information (recovery record) may be added to an archive.
Create recovery volumes (.rev files), which can be later used to reconstruct missing files in a volume set. This command has sense only for multivolume archives. For further details look in rar.txt.
Convert archive to or from SFX. The archive is merged with SFX-module in the user's home directory.
Test archive files.
Update files in archive. Adds files not already in the archive and updates files changed since they were packed to the archive.
Verbosely list archive [technical]
Extract files with full path.


NOTE: Every switch must be separated by a whitespace. They cannot be put together.
Display help on commands and switches. The same as when none or an illegal command line option is entered.
This switch tells to RAR that there is no more switches in the command line. It could be useful, if either archive or file name starts from '-' character. Without '--' switch such name would be treated as switch.
Clear Archive attribute after compression or extraction (Windows version only).
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. For further details look in rar.txt.
Add files with Archive attribute set (Windows version only).
Set path inside archive. This path is merged to file names when adding files to an archive and removed from file names when extracting.
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 archive. It is convenient to use this switch in combination with -u (update) to synchronize contents of an archive and an archiving directory.
Put authenticity verification (registered versions only). Details in register.txt.
Disable AV checking or adding.
Disable read configuration and environment.
Convert file names to lower case.
Convert file names to upper case.
Disable comments show.
Delete files after archiving. This switch in combination with the command "A" performs the same action as the command "M".
Open shared files. Allows to process files opened by other applications for writing.
Do not sort files while adding to a solid archive.
Do not add empty directories.
Do not process extended attributes. Only for OS/2 versions.
Do not add "end of archive" block.

This switch cannot be used with volumes, because the end of archive block contains information important for correct volume processing.

Exclude paths from names.
Exclude base dir from names.
Expand paths to full. Store full file paths (except a drive letter and leading path separator) when archiving.
Specifies file exclude attributes mask.
Freshen files. May be used with archive extraction or creation.
Encrypt both file data and headers. The password is case-sensitive. If you omit the password on the command line, you will be prompted with message "Enter password".
Disable percentage indicator.
Send archive by email. Win32 version only.
Send all messages to stderr.
Log errors to file (registered versions only).
Disable all messages.
Enable sound.
Lock archive. Any command which intends to change the archive will be ignored.
Keep broken extracted files.
Set compression level (0-store...3-default...5-best). By default rar uses -m3 method (Normal compression).
Set advanced compression parameters. For further details look in rar.txt.
Set dictionary size in Kb (64,128,256,512,1024,2048,4097 or a,b,c,d,e,f,g)
Specify file types to store.
Overwrite existing files.
Do not overwrite existing files.
Save symbolic links as the link instead of the file.
Save NTFS streams. Win32 version only.
Save file owner and group.
Encrypt files with the string <password> as password while archiving. The password is case-sensitive. If you omit the password on the command line, you will be prompted with message "Enter password".
Do not query password.
Recurse subdirectories.
Similar to -r, but when used with the commands 'a', 'u', 'f', 'm' will recurse subdirectories only for wildcard names.
Set priority and sleep time. Available only in RAR for Windows.
Add data recovery record.
Create recovery volumes. -s Create solid archive.
Create solid groups using file count. Similar to -s, but reset solid statistics after compressing <N> files.
Create solid groups using extension. Similar to -s, but reset solid statistics if file extension is changed.
Create independent solid volumes. Similar to -s, but reset solid statistics as soon as possible when starting a new volume.
Create dependent solid volumes. Similar to -s, but reset of solid statistics is disabled.
Disable solid archiving.
Create SFX archives. The archive is merged with SFX-module in the user's home directory.
Test files after archiving. This switch is especially useful in combination with the move command, so files will be deleted only if archive had been successfully tested.
Keep original archive time. Prevents rar from modifying the archive date when changing an archive.
Set archive time to latest file. Forces rar to set the date of a changed archive to the date of the newest file in the archive.
Update files.
Create volumes with size=<size>*1000 [*1024, *1].
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.
Assign work directory.
Exclude specified file. Wildcards may be used and you may specify the switch '-x' several times.
Exclude files in specified list file.
Read file names to exclude from stdin.
Assume Yes on all queries.
Read archive comment from file.


This manual page was written by Petr Cech <[email protected]> according to "rar -h" for the Debian GNU/Linux system (but may be used by others).