Bash History Logging [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Bash History Logging [Solved]

Postby hotsauce » Fri May 22, 2009 3:37

What's a good command to append to your bashrc to not log the history? And what is the best command to use to use on terminals to clear history without appending your bashrc?
hotsauce
Baby Hen
 
Posts: 5
Joined: Thu Apr 30, 2009 0:04

Re: Bash History Logging

Postby Fitzcarraldo » Fri May 22, 2009 15:02

Try
Code: Select all
unset HISTFILE
for the first question, and
Code: Select all
$ history -c
for the second question.

Some documentation:
Code: Select all
$ man bash
$ man history
and
history MAN Page
An A-Z Index of the Bash command line for Linux.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Bash History Logging

Postby hotsauce » Wed May 27, 2009 3:11

Perfect. Yeah I use history -c in my shells. That first command was just what I was looking for to add to my bashrc. I suppose I could get out of this laziness I've been in and read the man pages :) Even after a few years of using Linux, it's easy to forget the simple things to do to solve problems. Thanks.
hotsauce
Baby Hen
 
Posts: 5
Joined: Thu Apr 30, 2009 0:04

Re: Bash History Logging [Solved]

Postby hotsauce » Thu May 28, 2009 21:38

Just caught on to the fact we follow the Gentoo forum format, I'll be sure to post [Solved] after my posts.
hotsauce
Baby Hen
 
Posts: 5
Joined: Thu Apr 30, 2009 0:04


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 9 guests