本文介绍了删除Linux终端的历史的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你在Linux终端使用上键,你可以使用previous再命令。伟大的功能。不过,我开始记录的MySQL到MySQL在命令中的敏感信息。

When you use the up key in a Linux terminal, you can use previous commands again. Great feature. However, I started logging mysql into mysql with the sensitive details in the command.

我怎么能删除历史?

推荐答案

您可以清除您的bash的历史是这样的:

You can clear your bash history like this:

cat /dev/null > ~/.bash_history && history -c && exit

猫的/ dev / null的> 〜/ .bash_history的擦除〜/ .bash_history的文件的内容。

历史-c 清除当前终端的历史。

history -c clears the current terminal history.

这篇关于删除Linux终端的历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 20:21
查看更多