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, Sep 1, 2011 at 6:21 PM, Ian D. Leroux <idleroux%fastmail.fm@localhost> 
wrote:
> On Thu, 01 Sep 2011 18:16 +0200, "feralert" <feralert%gmail.com@localhost> 
> wrote:
>> On Thu, Sep 1, 2011 at 5:54 PM, Ian D. Leroux 
>> <idleroux%fastmail.fm@localhost>
>> wrote:
>> > 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
>>
>> mount output  looks fine to me:
>>
>> /dev/sd0a on / type ffs (soft dependencies, local)
>> /dev/sd0f on /var type ffs (soft dependencies, local)
>> /dev/sd0e on /usr type ffs (soft dependencies, local)
>> /dev/sd0g on /home type ffs (soft dependencies, local)
>>
>> Tried creating a file and login out and back in and it didn't disappear.
>>
>> And then I checked the contents of .bash_history and now it seems that
>> is keeping the commands for this evening logins. Maybe it clears the
>> file after a period of time? As i said 'crontab -l' doesnt show
>> anything suspicious...
>
> As which user are you running crontab -l?  Could the relevant command be
> in some other uid's crontab?  Beyond that, as I don't use bash myself
> and as the problem appears to be bash-specific (and intermittent to
> boot), I think I'm out of suggestions.  Good luck!
>
> --IDL
>

I run it as the root user, cause it's roots history that I'm missing.

Thanks for all your help.


Home | Main Index | Thread Index | Old Index