unrar(1)
Extract, test, and list files from RAR archives.
Synopsis
unrar [OPTION]... ARCHIVE [FILE]...Description
unrar extracts files from RAR archives, a proprietary compression format. It supports RAR4 and RAR5 archive formats and can list archive contents, test integrity, and extract with optional password protection.
By default, unrar extracts files to the current directory, preserving the original directory structure stored in the archive. Use flags to control extraction behavior, such as overwriting, path handling, and password input.
Common options
| Flag | What it does |
|---|---|
x | Extract files with full path (recreates directory structure) |
e | Extract files to current directory (ignores paths in archive) |
t | Test integrity of archive files without extracting |
l | List archive contents in short format |
lb | List archive contents in bare format (filenames only) |
-p PASSWORD | Supply password for encrypted archive |
-o+ | Overwrite existing files without prompting |
-o- | Skip existing files without prompting |
-r | Recursively extract from nested archives |
-v | List files in verbose format with detailed information |
-c- | Disable comments display |
-y | Assume yes to all prompts |
Examples
Extract all files from archive.rar, preserving directory structure
unrar x archive.rarList contents of archive.rar without extracting
unrar l archive.rarTest integrity of archive.rar and verify all files are readable
unrar t archive.rarExtract password-protected archive.rar with the given password
unrar x -p mypassword archive.rarExtract all files to /tmp/ directory, ignoring original paths
unrar e archive.rar /tmp/Extract only specific files from archive.rar
unrar x archive.rar document.txt image.jpgExtract archive.rar, overwriting any existing files
unrar x -o+ archive.rarList files with verbose details including compression ratios
unrar v archive.rar