Click to See Complete Forum and Search --> : deleting command history?


]Unicron[
03-19-2002, 10:08 PM
hi all
i like in linux that you have the possibility to reaccess old commands with the arrow-keys.
but how you can delete this history?

i hope you can understand my bad english :-).

thanks in advance

]Unicron[
03-19-2002, 10:22 PM
i mean the bash-history

demian
03-19-2002, 10:28 PM
The history is stored in ~/.bash_history So just delete that file and it's gone. (At least that's the default location. You can specify the history file by setting HISTFILE)

With the variable HISTFILESIZE you can change the number of commands stored in the history file. So setting this to zero will give you no command history at all.

Mark25
03-19-2002, 10:55 PM
Also, since recently visited directories are listed in the directory stack, you can see where you have been by typing dirs
the usage is
dirs [-clpv] [+N] [-N]

here you could clear the stack by using the -c option

Also, the popd command removes directories from the list

just a thought :)

demian
03-19-2002, 10:57 PM
Originally posted by Mark25:
<STRONG>Also, since recently visited directories are listed in the directory stack, you can see where you have been by typing dirs
the usage is
dirs [-clpv] [+N] [-N]
</STRONG>
Cool, I didn't know that.
/me wonders what to do with his newly aquired knowledge

Lorithar
03-19-2002, 11:36 PM
is handy for figuring out where ya been, and going back ... if ya can clip copy it back to the command line.