Sunday, March 22, 2015

How to delete history command record in linux



Before deleting a record lets get some knowledge about linux commands history.
Try below command in terminal to get command history,

[akila@localhost ~]# history

To know more about history command try below man command,

[akila@localhost ~]# man history

When u try history command, you can see your previous entered commands with an id number.
Remember the id number of the command you want to remove and then type below command 

[akila@localhost ~]# history –d <id no of command>

That’s all. Now the entry will remove from the $HISTFILE. You can do same using $HISTFILE like below,
[akila@localhost ~]# vi $HISTFILE

No comments:

Post a Comment