Playing with the shell history on Unix-ish systems
When using the shell on a server, you could type command revealing secrets on your root password or on your server organisation. For instance: just imagine your return keypress has not been working while becoming root, and your « su » password would be written without security asterisk and save in the history…)…
Moreover, it’s sometimes useful to scan your entire history when playing around with your shell.
So you juste have to learn the some shell history tricks command.
How to list the entire shell history ?
Just type « history »
How to clear the shell history ?
Just type « history -c »
How to avoid having twice the same command in the shell history ?
Just insert this in » ~/.bash_profile: »
Hope these few tricks could have been useful for you !