How to Safely Clear Shell Command History in Linux All In One
Linux safety clear shell command history All In One
如何在 Linux 中安全地清除 Shell 命令历史记录
history
shell command
$ cat ~/.bash_history
# bash ✅
$ history -c
$ cat ~/.zsh_history
# zsh ✅
$ history -p
# 手动删除
$ sudo rm -rf ~/.bash_history
# 使用空白覆盖
$ echo -n > ~/.bash_history
$ echo > ~/.bash_history
$ echo "💩" > ~/.bash_history
-n
do not output the trailing newline
不要输出尾随的换行符
demos
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
calendly
30 Minute Meeting
30 mins
Time zone: China, Singapore, Perth Change
Friday, April 4
09:00
See all available times
https://calendly.com/event_types/user/me
refs
https://unix.stackexchange.com/questions/544373/how-to-clear-history-in-zsh
https://github.com/aplyc1a/blogs/blob/master/取证溯源/Linux取证-(1).md#1-历史记录残余
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/18808595
未经授权禁止转载,违者必究!