TW 20240512 kills bash history
Hi, as a heads-up: after yesterdays TW update my .bash_history is gone (with timestamp of yesterdays update) Anyone else? Cheers Axel
I don't have any updates on Tumbleweed (zypper ref; zypper dup) and am on Tumbleweed 20240512. My bash history is intact. Detlev 15 May 2024 10:45:10 Axel Braun <docb@opensuse.org>:
Hi,
as a heads-up: after yesterdays TW update my .bash_history is gone (with timestamp of yesterdays update)
Anyone else? Cheers Axel
Moin, On Wed, 15 May 2024, 10:44:16 +0200, Axel Braun wrote:
Hi,
as a heads-up: after yesterdays TW update my .bash_history is gone (with timestamp of yesterdays update)
Anyone else?
Nope. I'd suggest to look at $HISTFILESIZE and/or $HISTSIZE. Setting HISTCONTROL to "ignoredups:erasedups" helps to slow down the growth rate.
Cheers Axel
Cheers. l8er manfred
Hello, In the Message; Subject : TW 20240512 kills bash history Message-ID : <26399002.1r3eYUQgxm@x1e> Date & Time: Wed, 15 May 2024 10:44:16 +0200 [AB] == Axel Braun <docb@opensuse.org> has written: AB> Hi, AB> as a heads-up: AB> after yesterdays TW update my .bash_history is gone (with AB> timestamp of yesterdays update) Please show the results of; 1. $ echo $HISTFILE and 2. $ ls -l /home Best Regards. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Loyalty cards are a symbol of "spending" not "saving"... I saved 20,000 yen a month when I stopped "act of collecting points"" -- Shihomi Shimomura --
Am Mittwoch, 15. Mai 2024, 11:37:59 MESZ schrieb Masaru Nomiya:
Hello,
In the Message;
Subject : TW 20240512 kills bash history Message-ID : <26399002.1r3eYUQgxm@x1e> Date & Time: Wed, 15 May 2024 10:44:16 +0200
[AB] == Axel Braun <docb@opensuse.org> has written:
AB> Hi,
AB> as a heads-up: AB> after yesterdays TW update my .bash_history is gone (with AB> timestamp of yesterdays update)
Please show the results of;
1. $ echo $HISTFILE
docb@X1E:~> english echo $HISTFILE /home/docb/.bash_history (it is there, but empty)
and
2. $ ls -l /home
docb@X1E:~> english ls -l /home total 68 drwxr-xr-x 111 docb users 36864 May 14 19:08 docb drwxrwxrwx 23 test users 4096 Apr 22 14:48 test drwxrwxrwx 3 root root 54 Jul 17 2020 test2 drwxr-xr-x 20 test3 users 4096 Mar 25 20:56 test3 Cheers Axel
Hello, In the Message; Subject : Re: TW 20240512 kills bash history Message-ID : <2683539.lGaqSPkdTl@x1e> Date & Time: Wed, 15 May 2024 11:49:33 +0200 [AB] == Axel Braun <docb@opensuse.org> has written: AB> Am Mittwoch, 15. Mai 2024, 11:37:59 MESZ schrieb Masaru Nomiya: [...] MN> > Please show the results of; MN> > 1. $ echo $HISTFILE AB> docb@X1E:~> english echo $HISTFILE AB> /home/docb/.bash_history AB> (it is there, but empty) [...] Ah, how about this? $ sudo chown docb:docb ~/.bash_history && chmod 660 ~/.bash_history HTHs. Best Regards. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Microsoft is overhauling its cybersecurity strategy, called the Secure Future Initiative, to incorporate key security features into its core set of technology platforms and cloud services. " -- Microsoft overhauls cyber strategy to finally embrace security by default --
Am Mittwoch, 15. Mai 2024, 12:46:48 MESZ schrieb Masaru Nomiya:
Ah, how about this?
$ sudo chown docb:docb ~/.bash_history && chmod 660 ~/.bash_history
Not sure that makes sense, as there is no group 'docb' docb@X1E:~> dir .bash_history -rw------- 1 docb users 0 14. Mai 17:21 .bash_history -> Its only writeable for me, and receives updates after bash session is closed. Not sure the latter was always the case.... Cheers Axel
Hello, In the Message; Subject : Re: TW 20240512 kills bash history Message-ID : <4379624.UPlyArG6xL@x1e> Date & Time: Wed, 15 May 2024 13:29:43 +0200 [AB] == Axel Braun <docb@opensuse.org> has written: AB> Am Mittwoch, 15. Mai 2024, 12:46:48 MESZ schrieb Masaru Nomiya: MN> > Ah, how about this? MN> > $ sudo chown docb:docb ~/.bash_history && chmod 660 ~/.bash_history AB> Not sure that makes sense, as there is no group 'docb' This is mine; -rw------- 1 masaru masaru 14177 May 15 20:55 ~/.bash_history AB> docb@X1E:~> dir .bash_history AB> -rw------- 1 docb users 0 14. Mai 17:21 .bash_history AB> -> Its only writeable for me, and receives updates after bash session AB> is closed. AB> Not sure the latter was always the case.... Your history command store in RAM until you regularly terminate your terminal. Then list of your command write into the .bash_history. If you wanted to write your commands history at anytime you need, use below command: $ history -a Best Regards & Good Night. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Loyalty cards are a symbol of "spending" not "saving"... I saved 20,000 yen a month when I stopped "act of collecting points"" -- Shihomi Shimomura --
On 2024-05-15 14:02, Masaru Nomiya wrote:
Your history command store in RAM until you regularly terminate your terminal. Then list of your command write into the .bash_history. If you wanted to write your commands history at anytime you need, use below command:
$ history -a
I have lost history now and then, so possibly a cronjob to make a backup would make sense. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
On Wed, 15 May 2024, 14:39:48 +0200, Carlos E. R. wrote:
On 2024-05-15 14:02, Masaru Nomiya wrote:
Your history command store in RAM until you regularly terminate your terminal. Then list of your command write into the .bash_history. If you wanted to write your commands history at anytime you need, use below command:
$ history -a
I have lost history now and then, so possibly a cronjob to make a backup would make sense.
This is true and works as expected - see HISTSIZE and HISTFILESIZE in "man bash". I have set them to 4000000 after having lost my history... @Axel: how much space is free/used in your home directory? Cheers. l8er manfred
On Thu, 16 May 2024, 11:43:08 +0200, Axel Braun wrote:
Am Mittwoch, 15. Mai 2024, 17:28:51 MESZ schrieb Manfred Hollstein:
@Axel: how much space is free/used in your home directory?
some 150 GB left on the device...that should not be the issue ;-)
Again, put the following into your ~/.bashrc and forget about such issues for a long time: HISTCONTROL=ignoredups:erasedups HISTFILESIZE=4000000 HISTSIZE=4000000 The "ignoredups:erasedups" ensures that identical commands are only saved once - you would have to use more than 4000000 different commands, before the file gets truncated again. HTH, cheers. l8er manfred
Hello, In the Message; Subject : Re: TW 20240512 kills bash history Message-ID : <4724158.vXUDI8C0e8@x1e> Date & Time: Thu, 16 May 2024 11:43:08 +0200 [AB] == Axel Braun <docb@opensuse.org> has written: AB> Am Mittwoch, 15. Mai 2024, 17:28:51 MESZ schrieb Manfred Hollstein: MH> > @Axel: how much space is free/used in your home directory? AB> some 150 GB left on the device...that should not be the issue ;-) No, Manfred has a point. Please show the result of; $ df -H Best Regards. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "Microsoft is overhauling its cybersecurity strategy, called the Secure Future Initiative, to incorporate key security features into its core set of technology platforms and cloud services. " -- Microsoft overhauls cyber strategy to finally embrace security by default --
On 2024-05-15 17:28, Manfred Hollstein wrote:
On Wed, 15 May 2024, 14:39:48 +0200, Carlos E. R. wrote:
On 2024-05-15 14:02, Masaru Nomiya wrote:
Your history command store in RAM until you regularly terminate your terminal. Then list of your command write into the .bash_history. If you wanted to write your commands history at anytime you need, use below command:
$ history -a
I have lost history now and then, so possibly a cronjob to make a backup would make sense.
This is true and works as expected - see HISTSIZE and HISTFILESIZE in "man bash". I have set them to 4000000 after having lost my history...
I understand that the history file has a maximum size, but reaching it should just limit the size, not set it to zero. cer@Telcontar:~> echo $HISTFILESIZE 1000 cer@Telcontar:~> cer@Telcontar:~> l .bash_history* -rw------- 1 cer users 33941 May 16 12:38 .bash_history -rw------- 1 cer users 24239 Feb 10 2023 .bash_history.20230211 -rw------- 1 cer users 33941 May 16 12:42 .bash_history.20240516 -rw------- 1 cer users 3372 Jan 4 2011 .bash_history.backup -rw------- 1 cer users 1538 Feb 21 2008 .bash_history.backup2 cer@Telcontar:~>
@Axel: how much space is free/used in your home directory?
cer@Telcontar:~> df -h . Filesystem Size Used Avail Use% Mounted on /dev/sdc5 98G 85G 8,7G 91% /home cer@Telcontar:~> Not a problem. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
Hello, In the Message; Subject : Re: TW 20240512 kills bash history Message-ID : <5cc5f81b-3699-48fb-94d7-8539f999cd3a@telefonica.net> Date & Time: Thu, 16 May 2024 12:43:50 +0200 [CER] == "Carlos E. R." <robin.listas@telefonica.net> has written: CER> On 2024-05-15 17:28, Manfred Hollstein wrote: CER> > On Wed, 15 May 2024, 14:39:48 +0200, Carlos E. R. wrote: CER> >> On 2024-05-15 14:02, Masaru Nomiya wrote: [...] MH> > This is true and works as expected - see HISTSIZE and HISTFILESIZE in MH> > "man bash". I have set them to 4000000 after having lost my history... CER> I understand that the history file has a maximum size, but CER> reaching it should just limit the size, not set it to zero. CER> cer@Telcontar:~> echo $HISTFILESIZE CER> 1000 CER> cer@Telcontar:~> CER> cer@Telcontar:~> l .bash_history* CER> -rw------- 1 cer users 33941 May 16 12:38 .bash_history CER> -rw------- 1 cer users 24239 Feb 10 2023 .bash_history.20230211 CER> -rw------- 1 cer users 33941 May 16 12:42 .bash_history.20240516 CER> -rw------- 1 cer users 3372 Jan 4 2011 .bash_history.backup CER> -rw------- 1 cer users 1538 Feb 21 2008 .bash_history.backup2 CER> cer@Telcontar:~> MH> > @Axel: how much space is free/used in your home directory? CER> cer@Telcontar:~> df -h . CER> Filesystem Size Used Avail Use% Mounted on CER> /dev/sdc5 98G 85G 8,7G 91% /home CER> cer@Telcontar:~> CER> Not a problem. Thanks. Google shows many messages that there is no history in .bash_history, but the cause seems to be in limbo.... Best Regards & Good Night. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "As Google fights for positioning in a new AI boom and an era where some consumers are turning to TikTok or ChatGPT instead of Google Search, some employees now worry product development could become dangerously hasty. The restructuring of RESIN has increased those concerns, the sources say." -- Google Splits Up a Key AI Ethics Watchdog --
On 15/5/24 11:44, Axel Braun wrote:
Hi,
as a heads-up: after yesterdays TW update my .bash_history is gone (with timestamp of yesterdays update)
Anyone else?
I've seen this bug a couple of times, very infrequently. This could happen if the shell doesn't exit cleanly (a crash), see BASH's maintainer reply here: https://lists.gnu.org/archive/html/bug-bash/2013-07/msg00096.html I am not sure of the current behaviour in BASH, but I assume the same file writing race condition still exits somehow, very infrequent, but still there. To get around that, I do a regular backup of $HOME, which includes ~/.bash_history (and/or a git repo init'ed in ~/, with .bash_history committed to the repo every now and then). Regards, Ahmad Samir
participants (7)
-
Ahmad Samir
-
Axel Braun
-
Carlos E. R.
-
Detlev Conrad Mielczarek
-
Manfred Hollstein
-
Masaru Nomiya
-
Stratos Zolotas