1.查看历史操作命令
history
cat ~/.bash_history
2.删除历史操作命令
history -c
true > cat ~/.bash_history
3.设置为不记录历史操作命令
vim /etc/profile
修改 HISTSIZE=0(默认 HISTSIZE=1000,表示记录最近的1000条操作命令),并reboot,则用户将不再记录历史操作命令。
|
1.查看历史操作命令
history
cat ~/.bash_history
2.删除历史操作命令
history -c
true > cat ~/.bash_history
3.设置为不记录历史操作命令
vim /etc/profile
修改 HISTSIZE=0(默认 HISTSIZE=1000,表示记录最近的1000条操作命令),并reboot,则用户将不再记录历史操作命令。
|