On 04/28/2011 02:25 AM, Kamaraju S Kusumanchi wrote:
shawn wilson wrote:

Is there a way to have a command that does not show up in history? Or a
way to pipe a string where the string doesn't show up in history?

Ie, I set some passwords with:
echo "some string and stuff" ¦ sha512sum
(Probably with cut and awk and other such things)

And I'd like a way for my system to not store my password scheme. I'd
prefer something better than editing my history file.

In bash, If I prepend the command with a space character, it does not show
up in the ~/.bash_history file.


This happens if in .bashrc you set the shell variable HISTCONTROL to include the value "ignorespace". See man bash

example:
HISTCONTROL=ignoredups:ignorespace

Vangelis


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4db90e63.5050...@yahoo.gr

Reply via email to