How
to Clear History
Is there any method to clear history
other than delete the contents of .bash_history in linux 7.2.
First note that deleting .bash_history
will _not_ remove history.
You can set the HISTSIZE environment variable
to limit the number of lines of history.
$ export HISTSIZE=0 The HISTFILESIZE variable controls the number of history written to bash_history. If you do $ export HISTFILESIZE=0 you will get history in the current session but it will not be written to disk. BTW you probably mean Redhat 7.2 not linux 7.2 ---------------------------------------------------------------------------------------------------------------------------- Use the command
This will clear the history
Have a Linux Issue?
Linux Home: Linux System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|