Hello Community,
how can I clear the History from Terminal ?
Hello Community,
how can I clear the History from Terminal ?
rm ~/.ash_history
You can create a script:
#!/bin/sh
rm ~/.ash_history
touch ~/.ash_history
exit
Save as: clear-history
Give permission: chmod +x clear-history
And put it in: ~/.local/bin
To run the script: clear-history
...
> ~/.ash_history
..should be sufficient..
Hello,
If I delete the file .ash_history (in /home/username/), the history as 'user' is cleared, that's OK.
But when I go root (su in terminal), I continue to see another history (history as root). Where/how can I delete history as root?
Thank you
As root repeat same command
> ~/.ash_history
or
> /root/.ash_history
OK, thank you.
To resume, to clear the history as user + root, I deleted 2 files :
/home/username/.ash_history
/root/.ash_history
You must log in to post.