如何在没有“Extracting ~”消息的情况下提取 rar 文件

iro*_*and 2 linux rar ubuntu

当我在 shell 脚本中使用 zip 命令时,我设置了 -q (--quiet) 选项。有 rar 命令的选项吗?

我不想在控制台中显示“Extracting ~”消息和 rar 版本信息。

我安装了 rar 命令sudo apt-get install rar。版本是“RAR 4.00 beta 3 版权所有 (c) 1993-2010 Alexander Roshal 2010 年 12 月 17 日”

我正在使用rar e $rarfile.

小智 8

使用开关。

-id[c,d,p,q]
      Disable messages. c-copyright, d-'done' message, p-percentage, q-be completely quiet
Run Code Online (Sandbox Code Playgroud)

例如,对于绝对没有输出:

rar e <rarfile> -idq
Run Code Online (Sandbox Code Playgroud)

PS -inul 与 -idq 功能相同


ran*_*on1 5

你总是可以通过管道stdout输入/dev/null。

rar e <rarfile> > /dev/null
Run Code Online (Sandbox Code Playgroud)

但这不应该阻止它向控制台打印错误消息。