How to clear the output of history command
Hello
How can I clear the output of history command, ctrl+l clears the screen not the output of history command, so is there anyway that history command does not show the previously executed commands. And also please let me know how I can kill Zoombie processes. Thank you Regards! Jeff80 |
Code:
history -c Code:
ps -eO user -H |
Hello
Thanks a lot |
Go to your home directory and type this in terminal
echo > .bash_history |
Quote:
|
Thank you, Mr. C. for the detailed explanation. Something new to learn every day!
|
Quote:
The key point is that there is both an in core history for each shell process, and on disk history loaded by newly started shells. Unsetting the HISTFILE shell variable will prevent saving to .bash_history. And preceding a command with a space will prevent that command from entering the history (if HISTCONTROL is set to ignorespace). See the variables in man bash that start with HIST. |
ps -eO user -H
I used the command in bash prompt as
bash#ps -eO root -H illegal option --H what's the mistake I m doing & was that alphabet "O" in caps or digit Zero (0) . |
Quote:
|
Thanks
Thanks Dude..
It worked.. I will kill these stray processes when my system will slow down. or lack resources... |
Hello jeff80 :)
Best keep to one topic per thread, else we gets confuzzled. What is "the history command" that you want o clear the output from? The answers you've been given tell you how to clear the file that records the history but I'm not sure that's what you were asking for. If you get an old command on your screen, typically by using the up arrow, you can get rid of it by Ctrl+C. Best Charles |
All times are GMT -5. The time now is 03:54 AM. |