How to List RAR Archive Contents Using Unrar

This guide explains how to view the contents of a RAR file from the command line without extracting it, detailing the exact unrar commands used for basic listings, detailed technical views, and script-friendly outputs.

The Standard List Command (l)

To display a standard list of files and folders contained inside a RAR archive, use the l command:

unrar l archive.rar

This command outputs a table showing the filename, original uncompressed size, date, time, and file attributes for each item in the archive, along with a summary total at the bottom.

The Verbose List Command (v)

To view full technical details for each file, use the v (verbose) command:

unrar v archive.rar

In addition to the standard file information, the verbose listing includes:

  • Packed (compressed) file size
  • Compression ratio percentage
  • CRC32 checksums
  • Host operating system

Listing File Names Only (lb or vb)

If you need a clean output containing only the file paths—useful when piping results to other commands like grep, xargs, or text files—add the b (bare) modifier to either command:

unrar lb archive.rar

This prints only the file names, one per line, omitting all headers, file sizes, and summary footers.

Handling Password-Protected Archives

If the archive requires a password to view its contents, provide the password using the -p switch:

unrar l -pSecretPassword archive.rar

If you do not specify the password inline, unrar will prompt you to enter it securely in the terminal before displaying the list.