Re: Random loss of bash history

2014-10-10 Thread Linda Walsh




Your ironic stance won't help your case.
Especially when what you describe is not true, 0 in 4.2 means 0.


FWIW, in the 4.3 README, under differences from 4.2:

n.  Setting HISTSIZE to a value less than zero causes the history list to be
unlimited (setting it 0 zero disables the history list).

o.  Setting HISTFILESIZE to a value less than zero causes the history file size
to be unlimited (setting it to 0 causes the history file to be truncated
to zero size).

---
and that's why user's should be wary of reading release notes! ;-)



Re: Random loss of bash history

2014-10-10 Thread Linda Walsh

I stand corrected... this isn't new.  Still
when such numbers often mean unlimited and negative
ones are invalid, I see little or no utility in
truncating someone's histfile to 0.  If someone wanted
to delete it, they would.   Defaulting to truncation behavior
on changing those controls to '0', serves little purpose
other than to potentially wipe someone's history and keep
it disabled -- when if that's really what they wanted, the'd
just turn the option off.

So, it's not a brilliant NEW feature.  It's a brilliant
design.  Period.

Happier?

(Sitting corrected...;-) )


Pierre Gaston wrote:



On Fri, Oct 10, 2014 at 11:40 AM, Linda Walsh > wrote:


You DID read the release notes and changes from 4.2->4.3.

Someone had the bright idea that .. in 4.2, '0' meant no limit in
history (in bash and readline)... but in 4.3, '0' means 0 and throw
away history while negative values mean keep it all.

Perhaps you were hit by this brilliant new feature -- no doubt
a new POSIX blessing.


Your ironic stance won't help your case.
Especially when what you describe is not true, 0 in 4.2 means 0.

$ HISTSIZE=10
$ echo $BASH_VERSION
4.2.53(1)-release
$ history
  999  PS1=\$\
 1000  HIST_SIZE=10
 1001  echo $BASH_VERSION
 1002  history
$ HISTSIZE=0
$ history
$






Re: Random loss of bash history

2014-10-10 Thread Pierre Gaston
On Fri, Oct 10, 2014 at 11:40 AM, Linda Walsh  wrote:

> You DID read the release notes and changes from 4.2->4.3.
>
> Someone had the bright idea that .. in 4.2, '0' meant no limit in
> history (in bash and readline)... but in 4.3, '0' means 0 and throw
> away history while negative values mean keep it all.
>
> Perhaps you were hit by this brilliant new feature -- no doubt
> a new POSIX blessing.
>

Your ironic stance won't help your case.
Especially when what you describe is not true, 0 in 4.2 means 0.

$ HISTSIZE=10
$ echo $BASH_VERSION
4.2.53(1)-release
$ history
  999  PS1=\$\
 1000  HIST_SIZE=10
 1001  echo $BASH_VERSION
 1002  history
$ HISTSIZE=0
$ history
$


Re: Random loss of bash history

2014-10-10 Thread Linda Walsh

You DID read the release notes and changes from 4.2->4.3.

Someone had the bright idea that .. in 4.2, '0' meant no limit in
history (in bash and readline)... but in 4.3, '0' means 0 and throw
away history while negative values mean keep it all.

Perhaps you were hit by this brilliant new feature -- no doubt
a new POSIX blessing.


Darshit Shah wrote:
I'm running Bash 4.3.30(1)-release on Arch Linux. Recently after I 
rebooted by system I realized that all my Bash History had been erased. 
The ~/.bash_history file existed, but it was completely empty.


The situation occurred just now once again. I boot up my system and 
realize that I have no bash history at all. The issue does not occur at 
every boot, it's random and I am unable to correlate the two instances 
in which this has happened to me.


I haven't any idea as to how I should debug this problem to provide more 
information. Could you please start out by helping me there?






Re: Random loss of bash history

2014-10-09 Thread Bob Proulx
Darshit Shah wrote:
> I'm running Bash 4.3.30(1)-release on Arch Linux. Recently after I rebooted
> by system I realized that all my Bash History had been erased. The
> ~/.bash_history file existed, but it was completely empty.
> 
> The situation occurred just now once again. I boot up my system and realize
> that I have no bash history at all. The issue does not occur at every boot,
> it's random and I am unable to correlate the two instances in which this has
> happened to me.
> 
> I haven't any idea as to how I should debug this problem to provide more
> information. Could you please start out by helping me there?

What type of file system is your ~/.bash_history located upon?  This
sounds like a deja vu from the ext4 file system.  Do you observe any
other zero sized files after a reboot?

Bob



Random loss of bash history

2014-10-09 Thread Darshit Shah
I'm running Bash 4.3.30(1)-release on Arch Linux. Recently after I rebooted by 
system I realized that all my Bash History had been erased. The ~/.bash_history 
file existed, but it was completely empty.


The situation occurred just now once again. I boot up my system and realize that 
I have no bash history at all. The issue does not occur at every boot, it's 
random and I am unable to correlate the two instances in which this has happened 
to me.


I haven't any idea as to how I should debug this problem to provide more 
information. Could you please start out by helping me there?


--
Thanking You,
Darshit Shah


pgpxEonhbtwNc.pgp
Description: PGP signature