How does linux clear historical commands?
Below by the Linux tutorial column to introduce you under the linux environment, clear the history recorded in the history of the command method, I hope to help friends in need!
1. History
This command allows you to view historical commands that have been used
II. History-c
This command and argument can clear the history historical command record
Check again
The command record is already empty
Remarks: knowledge expansion
This command only deletes the command record of the current user, not that of other users.
In fact, these records are in the current user's home directory. Bash_history similar files, of course, depends on what shell you use.
For example: vim ~ /. Bash_history opens the history command record file under the current user.
Cat or vim ~ / .bash_history to view the contents of the file
These are the details of the historical commands recorded in history under linux. Please pay attention to other related articles for more.