How to Run Unrar Silently with No Output
This article explains how to execute the unrar utility
in complete silence without displaying extraction progress, banner text,
or error messages. By applying the appropriate native command-line
switches and handling potential interactive prompts, you can fully
suppress console output for automated scripts and background tasks.
The Silent Option:
-inul
The native command-line switch that makes unrar run
completely silently is -inul.
The -inul switch stands for "inhibit all messages." When
included in the command, unrar disables all output to the
console, including copyright banners, file lists, percentage progress,
and error notifications.
Basic Usage
To extract an archive into the current directory with full pathnames
silently, use the x command along with the
-inul switch:
unrar x -inul archive.rarTo extract files without preserving their directory paths, use the
e command instead:
unrar e -inul archive.rarPreventing Interactive Prompts in Scripts
While -inul suppresses text output, unrar
may still pause execution to wait for user input if a file already
exists or if an archive requires a password. To make an automated
execution truly unattended and silent, pair -inul with
switches that resolve interactive prompts:
-o+: Automatically overwrites existing files without asking.-o-: Skips existing files without overwriting or asking.-p-: Disables password prompts, causing password-protected files to fail immediately rather than waiting for input.
Fully Automated Example
unrar x -inul -o+ -p- archive.rar /destination/path/OS-Level Redirection Alternative
If your version of unrar lacks native switch support or
if you want to ensure standard system-level silence across scripts,
redirect standard output (stdout) and standard error
(stderr) to the system's null device.
On Linux and macOS:
unrar x archive.rar > /dev/null 2>&1On Windows:
unrar x archive.rar > NUL 2>&1