【问题标题】:How to list commands history with busybox?如何使用busybox列出命令历史记录?
【发布时间】:2021-09-07 07:45:25
【问题描述】:

我在 apf51 board 上使用带有 buildroot 的busybox。在控制台中,我可以使用“向上箭头”调用之前键入的命令,或者使用 Ctrl+g 在命令列表中搜索。

但是history这个命令不存在:

# history
-sh: history: not found

有没有办法用busybox列出以前输入的命令?

【问题讨论】:

    标签: busybox apf51


    【解决方案1】:

    由于 BusyBox 使用 ash,您应该能够从 ~/.ash_history 文件中读取历史记录,例如:

    $ tail ~/.ash_history
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-08-17
      • 1970-01-01
      • 1970-01-01
      • 2011-09-22
      • 2011-03-11
      • 2010-10-14
      • 1970-01-01
      相关资源
      最近更新 更多