Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Jan 2013 18:38:39 -0500
From:      Andre Goree <andre@drenet.info>
To:        =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Bash history empty on login
Message-ID:  <50ECADFF.6080003@drenet.info>
In-Reply-To: <alpine.BSF.2.00.1301081507260.41917@mail.fig.ol.no>
References:  <op.wqkfn7omqdqf40@desktop.drenet.local> <201301080759.52247.dyioulos@onpointfc.com> <op.wqlircacqdqf40@localhost.localdomain> <alpine.BSF.2.00.1301081507260.41917@mail.fig.ol.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/08/13 09:11, Trond Endrestøl wrote:
> On Tue, 8 Jan 2013 09:05-0500, Andre Goree wrote:
> 
>> On Tue, 08 Jan 2013 07:59:51 -0500, Dimitri Yioulos <dyioulos@onpointfc.com>
>> wrote:
>>
>>>
>>> Hope I'm not offending you if the following are things
>>> you've tried as a matter-of-course:
>>>
>>> After booting up, is history started, or do you have to do
>>> that manually?  Have you run "set -o" to see if history is
>>> enabled?  If it isn't, then "set -o history".  Is a "clear"
>>> command being issued from anywhere upon logout or reboot?
>>>
>>> Just some thoughts.
>>>
>>
>> No offense at all, thanks for your suggestions!  I'm currently at work so I'll
>> test this when I get home (this is on a desktop running 8.3-stable).  I've
>> never had to do anything special when using bash on FreeBSD.  I'll be sure to
>> check th output of "set -o" and report back here.
>>
>> If there's an erroneous 'clear' command somewhere, it must be on logout since
>> I can easily test this problem being that I use tmux.  :)  I also do not have
>> a .bash_logout file, if that matters.
>>
>> Thanks for the suggestions, I'll let you know what turns up.
> 
> What are the permissions of ~/.bash_history?
> 
> Usually they are set to 0600 in octal due to security concerns and 
> rightfully so. Could they be (re)set to 0400 or even 0000?
> 

I think I've found the culprit, however:
[agoree@desktop ~]$ echo $HISTFILESIZE
1024000
[agoree@desktop ~]$ echo $HISTFILE
/home/agoree/.bash_history
[agoree@desktop ~]$ ll /home/agoree/.bash_history
-rw-------  1 agoree  agoree    12k Jan  5 14:09 /home/agoree/.bash_history
[agoree@desktop ~]$ cat /home/agoree/.bash_history
cat: /home/agoree/.bash_history: Input/output error
[agoree@desktop ~]$ file /home/agoree/.bash_history
/home/agoree/.bash_history: ERROR: cannot read
`/home/agoree/.bash_history' (Input/output error)

I suppose I'm in need of a scrub, eh?  Or perhaps just a tweak to
$HISTFILE until I have the time (or energy) to deal with the scrub --
probably not a good idea, but sense all my important data is kept on a
NAS...  :p


-- 
Andre Goree
andre@drenet.info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50ECADFF.6080003>