码迷,mamicode.com
首页 > 系统相关 > 详细

linux 清空历史命令

时间:2018-11-19 20:28:15      阅读:384      评论:0      收藏:0      [点我收藏+]

标签:history   ash   执行   his   删除   目录   linux   用户   历史命令   

系统版本:CentOS 6

history -c 命令可以清空当前窗口的历史输出命令。

要彻底删除历史命令可以有如下几种方式:

在当前用户的~目录下执行:

方式1:

echo > .bash_history

方式2:

cat /dell/null > .bash_history

方式3:

直接vi编辑:.bash_history

 

linux 清空历史命令

标签:history   ash   执行   his   删除   目录   linux   用户   历史命令   

原文地址:https://www.cnblogs.com/hellojesson/p/9984518.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!