🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.shell
2 messages
2 total messages Started by John Sat, 03 Oct 2009 09:54
Bash history weirdness
#4031
Author: John
Date: Sat, 03 Oct 2009 09:54
15 lines
1315 bytes
Hi,

Bash's history command is behaving oddly.

If I do "history -w" then it writes the current history to
~/.bash_history as expected.

But if I do "history -a" then ~/.bash_history doesn't get changed, and
from the modification time it hasn't been touched at all.

Any ideas for what might be causing this? Any obvious shell options or
suchlike that I should check?

Cheers,
John
Re: Bash history weirdness
#4032
Author: John
Date: Sun, 04 Oct 2009 15:50
14 lines
1443 bytes
On  3 Oct 2009 at 20:19, Wanna-Be Sys Admin wrote:
> John wrote:
>> If I do "history -w" then it writes the current history to
>> ~/.bash_history as expected.
>> 
>> But if I do "history -a" then ~/.bash_history doesn't get changed, and
>> from the modification time it hasn't been touched at all.
>
> Where they "new" history lines, or did you run that right after -w?

Yes, there was history to write!

Actually what happened was that I noticed "history -a" wasn't working,
then tried "history -w" and was surprised to find that it *did* work.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads