Forensicsrarextractarchiveunarchivernon-free

unrar-nonfree

unrar-nonfree is a non-free unarchiver for extracting files from .rar archives. It provides the unrar command along with supporting libraries for RAR file handling.

Description

unrar-nonfree extracts files from RAR archives, supporting multiple volumes and various extraction options. It is the non-free version of the unrar tool in Kali Linux, suitable for handling proprietary RAR formats. The package includes the main unrar binary as well as development libraries like libunrar-dev, libunrar-headers, and the shared library libunrar5t64 for integrating RAR extraction into other applications.

Use cases include forensic analysis where RAR archives need to be unpacked, data recovery from compressed RAR files, and general archive management in penetration testing environments. Unlike the free rar package which focuses on creation, unrar-nonfree specializes in extraction. Configuration files allow customizing default switches for commands.

The tool processes RAR archives with features like password protection, file filtering, and path manipulation, making it versatile for scripted extractions in security workflows.

How It Works

unrar-nonfree uses the libunrar library to parse and extract RAR archive formats, handling multi-volume archives by specifying the first volume. It supports commands like e for basic extraction and x for full-path extraction, applying switches to filter files, set passwords, manage paths, and control overwrite behavior. File lists via @listfiles enable batch extraction, while options like -p for passwords and -x for exclusions process archive contents according to specified criteria before decompressing to the target path.

Installation

bash
sudo apt install unrar-nonfree

Flags

--Stop switches scanning.
-@[+]Disable [enable] file lists.
-ad[1,2]Alternate destination path.
-ag[format]Generate archive name using the current date.
-aiIgnore file attributes.
-ap<path>Set path inside archive.
-c-Disable comments show.
-cfg-Disable read configuration.
-clConvert names to lower case.
-cuConvert names to upper case.
-dhOpen shared files.
-epExclude paths from names.
-ep3Expand paths to full name.
-ep4<path>Exclude the path prefix from names.
-fFreshen files.
-id[c,d,n,p,q]Display or disable messages.
-ierrSend all messages to stderr.
-inulDisable all messages.
-kbKeep broken extracted files.
-me[par]Set encryption parameters.
-n<file>Additionally filter included files.
-n@Read additional filter masks from stdin.
-n@<list>Read additional filter masks from list file.
-o+Overwrite existing files.
-o-Do not overwrite existing files.
-ol[a,-]Process symbolic links as the link [absolute paths, skip].
-om[-|1][=lst]Propagate Mark of the Web.
-op<path>Set the output path for extracted files.
-orRename files automatically.
-owSave or restore file owner and group.
-p[password]Set password.
-p-Do not query password.
-rRecurse subdirectories.
-sc<chr>[obj]Specify the character set.
-si[name]Read data from standard input (stdin).
-sl<size>Process files with size less than specified.
-sm<size>Process files with size more than specified.
-ta[mcao]<d>Process files modified after <d> YYYYMMDDHHMMSS date.
-tb[mcao]<d>Process files modified before <d> YYYYMMDDHHMMSS date.
-tn[mcao]<t>Process files newer than <t> time.
-to[mcao]<t>Process files older than <t> time.
-ts[m,c,a,p]Save or restore time (modification, creation, access, preserve).
-uUpdate files.
-vList all volumes.
-ver[n]File version control.
-vpPause before each volume.
-x<file>Exclude specified file.
-x@<list>Exclude files in specified list file.
-x@Read file names to exclude from stdin.
-yAssume Yes on all queries.

Examples

Extract files to current directory.
unrar e archive.rar
Extract files with full path.
unrar x archive.rar
List archive content.
unrar l archive.rar
Print file to stdout.
unrar p archive.rar file.txt
Test archive files.
unrar t archive.rar
Verbosely list archive.
unrar v archive.rar
Extract files from listfile to specified path.
unrar x archive.rar @listfiles.txt path_to_extract/
Extract password-protected archive to current directory.
unrar e -p<password> archive.rar
Updated 2026-04-16kali.org ↗