Yum:如何显示“Yum history list all”输出中的“Command Line”列?

当我在我的CentOS-7远程服务器上使用yum history list命令时,它显示以下格式的yum历史列表:

 ID | Command line | Date and time | Action(s) | Altered -------------------------------------------------------------------------------- 

但如果我这样调用它: yum history list 1..3yum history list all它输出:

 ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 

并跳过显示Command Line行列,这是我更可取的可见。 我怎么能告诉百胜显示Command Line行列而不是Login username

你可以用history_list_view选项来控制它

例如(对于一次性命令)…

 sudo yum --setopt=history_list_view=commands history list all 

yum和yum.conf手册页的相关部分是…

百胜

在“历史列表”中,您可以通过configuration选项history_list_view更改第二列的行为。

的yum.conf

history_list_view在“yum历史列表”命令中显示哪一列信息。 目前有三个选项:用户,cmds(或命令),auto。

旧版本的yum就像“用户”,它始终输出启动yum事务的用户。 您现在可以指定“命令”,而不是总是输出事务的命令行。 您还可以指定“单用户命令”,如果有多个用户,将显示用户,否则将显示命令行。