【发布时间】:2021-09-07 07:45:25
【问题描述】:
我在 apf51 board 上使用带有 buildroot 的busybox。在控制台中,我可以使用“向上箭头”调用之前键入的命令,或者使用 Ctrl+g 在命令列表中搜索。
但是history这个命令不存在:
# history
-sh: history: not found
有没有办法用busybox列出以前输入的命令?
【问题讨论】:
我在 apf51 board 上使用带有 buildroot 的busybox。在控制台中,我可以使用“向上箭头”调用之前键入的命令,或者使用 Ctrl+g 在命令列表中搜索。
但是history这个命令不存在:
# history
-sh: history: not found
有没有办法用busybox列出以前输入的命令?
【问题讨论】:
由于 BusyBox 使用 ash,您应该能够从 ~/.ash_history 文件中读取历史记录,例如:
$ tail ~/.ash_history
【讨论】: