如何永久清除 linux/ubuntu 终端或 bash 中的所有历史记录? [英] How to clear all history in linux/ubuntu terminal or bash permanently?

查看:25
本文介绍了如何永久清除 linux/ubuntu 终端或 bash 中的所有历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在 Linux 终端中使用向上键时,您可以再次使用以前的命令.很棒的功能.但是,我开始使用命令中的敏感细节将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.

如何永久删除该历史记录?

How can I delete that history permanently?

推荐答案

您可以像这样清除 bash 历史记录:

You can clear your bash history like this:

history -cw

这篇关于如何永久清除 linux/ubuntu 终端或 bash 中的所有历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆