Computing.Net > Forums > Linux > clearing history

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

clearing history

Reply to Message Icon

Name: sitesh
Date: January 6, 2007 at 01:53:00 Pacific
OS: Red Hat enterprise
CPU/Ram: P4 3.4 ghz/1024mb
Comment:

hi there, im jus new to linx, and i wanted to know how to clear the history PERMANANTLY of the commands that are stored in the shells.
thanks



Sponsored Link
Ads by Google

Response Number 1
Name: ernie
Date: January 6, 2007 at 21:55:22 Pacific
Reply:

I use Mandriva Linux 2007.0, so the file names I provide may vary for other distributions. For example, /etc/profile in Mandriva Linux may be similar in function to /etc/bashrc in other distributions.

If you use the bash command interpreter, and you want to remove the command history for a single specific user, you can empty the bash_history file in that user's home directory (make the file a zero byte file).

If you want to stop bash from storing the command history system wide, you can edit /etc/profile to change the line:

HISTSIZE=1000

to

HISTSIZE=0

then empty the bash_history file for each user on the system.

HTH,

Ernie Registered Linux User 247790
ICQ 41060744


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: clearing history

updating, installing, apps vanish www.computing.net/answers/linux/updating-installing-apps-vanish/24682.html

Clear Konqueror URL history www.computing.net/answers/linux/clear-konqueror-url-history/4018.html

erasing history www.computing.net/answers/linux/erasing-history/26802.html