Linux中禁用命令历史记录

关闭history记录功能

  • set +o history

打开history记录功能

  • set -o history

清空记录

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

临时不记录

  • 在执行的命令前添加空格。例如: history
posted @ 2018-01-06 17:05  zhuxiaoxi  阅读(8881)  评论(1编辑  收藏  举报