Playing with the shell history on Unix-ish systems

février 27, 2009

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:”
export HISTCONTROL=ignoredups

Hope these few tricks could have been useful for you !

Entry Filed under: administration, english publications. Mots-clefs: , , , .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Catégories

Articles récents

Mots-clefs

2.0 java blogosphère admin apache configuration CSS debian desactiver desinstaller démons ECMAScript fluxbb forum gpg GWT httpd.conf IDE IM inetd install installer php+mysql inutiles iphone iphoneOS jabber java javamail Javascript kopete mysql ménage netbeans new Function php phpbb privacité pstree punbb remove daemon serveur dédié services services linux sujet tomcat utf8 xinetd

Méta

Articles les plus consultés