NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bash: clean history on logout?



On Thu, 01 Sep 2011 17:45 +0200, "feralert" <feralert%gmail.com@localhost> 
wrote:
> On Thu, Sep 1, 2011 at 5:42 PM, Ian D. Leroux
> <idleroux%fastmail.fm@localhost> wrote:
> > On Thu, 01 Sep 2011 16:43 +0200, "feralert" <feralert%gmail.com@localhost>
> > wrote:
> >> I have a NetBSD 4.0 machine (a few actually) I have taken over from
> >> someone lately that doesn't keep bash history from one session to
> >> another.
> >>
> >> What i have tried so far is:
> >>
> >> - Check .bash_history is a regular file (not a link)    # ls -l
> >>   .bash_history    -rw------- 1 root wheel 10282 Sep  1 12:26
> >>   .bash_history
> >>
> >> - And that the HISTFILE var points to the right file     # echo
> >>   $HISTFILE     /root/.bash_history
> >>
> >> - looked for .bash_logout, but it doesnt exits.
> >>
> >> - checked in crontab but there is nothing there.
>
> Sorry, I forgot to add it to the 'tried things' list:
>
> # set | grep -i hist
> HISTFILE=/root/.bash_history HISTFILESIZE=500 HISTSIZE=500 
> SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-
> comments:monitor

Ok, how about checking that .bash_history is non-empty just before
logout, to make sure that there's something to delete.  Also, take a
look at the output of mount, to see if /root/ is actually on a read-
write disk-backed partition and not something funny like tmpfs null-
mounted over a read-only root partition.  Try writing to a file in
/root/  yourself just before logging out and see if it's still there
when you log in; maybe the problem isn't specific to .bash_history.

--IDL


Home | Main Index | Thread Index | Old Index