• set +o history

打开history记录功能

  • set -o history

清空记录

  • history -c 记录被清空,重新登录后恢复。
  • rm -f $HOME/.bash_history 删除记录文件,清空历史。

临时不记录

  • 在执行的命令前添加空格。例如: history

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2022-01-10
  • 2022-02-16
  • 2021-10-11
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2021-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-01-11
  • 2021-05-30
  • 2022-12-23
相关资源
相似解决方案