Quantcast
Channel: How to delete history of last 10 commands in shell? - Stack Overflow
Viewing all articles
Browse latest Browse all 23

Answer by Alex for How to delete history of last 10 commands in shell?

$
0
0

Maybe will be useful for someone.
When you login to any user of any console/terminal history of your current session exists only in some "buffer" which flushes to ~/.bash_history on your logout.
So, to keep things secret you can just:
history -r && exit
and you will be logged out with all your session's (and only) history cleared ;)


Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>