How to Skip Archive Comments in Unrar

When extracting RAR archives using the command-line utility unrar, embedded archive comments are often processed and displayed in the terminal output by default. This guide explains how to use the built-in -c- switch to instruct unrar to bypass and suppress archive comments completely during extraction.

Using the -c- Switch

The standard RAR command-line syntax provides the -c- switch specifically to disable the display and processing of comments. To extract an archive while ignoring its embedded comment, append -c- to your command:

unrar x -c- archive.rar

If you are extracting files into the current directory without preserving their folder structure, use the e command instead:

unrar e -c- archive.rar

How It Works

  • x / e: Instructs unrar to extract files with full paths (x) or into the working directory (e).
  • -c-: Disables the comment feature. By default, unrar reads the comment header and outputs the text block to the standard output. Adding the minus sign (-) after the c flag explicitly tells the utility to ignore the comment block.
  • archive.rar: The target archive to be extracted.

Skipping Extracted Comment Files

If the archive contains a standalone text file containing comments (such as comment.txt or descript.ion) rather than an embedded RAR metadata comment, use the exclusion switch -x to prevent that specific file from being written to disk:

unrar x -xcomment.txt archive.rar

To exclude all text files that might contain notes or comments:

unrar x -x*.txt archive.rar

By combining -c- to suppress internal metadata and -x to skip physical comment files, you can ensure a clean, silent extraction process suitable for automated scripts and terminal workflows.