zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: dominik.vogt@gmx.de, Zsh Users <zsh-users@zsh.org>
Subject: Re: Bug: Losing .zsh_history
Date: Fri, 7 Oct 2022 13:45:23 +0200	[thread overview]
Message-ID: <CAHYJk3T3hzxnoT5QxHnmnk_XFyZuCheZwvLZ8b1zyCqu-o6OAQ@mail.gmail.com> (raw)
In-Reply-To: <Yz3hLjGCw/bccjFY@localhost>

On 10/5/22, Dominik Vogt <dominik.vogt@gmx.de> wrote:
> Due to some hardware problem with the display adapter my box
> sometimes fails to show anything on the screen but just emits some
> error beeps while it boots.  Since I cannot log in and stop the
> machine without the screen, I can only switch off the power.
>
> It has now happened twice that in the wake of the hard switch-off,
> ~/.zsh_history got completely erased, replaced with all null
> characters, but keeping its size (or at least nor being truncated
> to zero size).  This is on Linux 4.x

Since this is linux, and assuming the problem is only the display and
you haven't fully locked the kernel, you could enable the sysrq magic
keys[1] if they aren't already, and instead of doing a hard power off,
press altgr(right alt) + printscreen + s u s b (wait a little between
each), the u will remount all mounts readonly, the s issues a sync,
and b will soft-reboot.

[1] See sysrq.txt in the kernel source

-- 
Mikael Magnusson


      parent reply	other threads:[~2022-10-07 11:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 19:55 Dominik Vogt
2022-10-05 20:01 ` Eric Cook
2022-10-05 20:20   ` Dominik Vogt
2022-10-05 21:05     ` Wesley
2022-10-05 21:24       ` Dominik Vogt
2022-10-05 22:31         ` Bart Schaefer
2022-10-05 23:03           ` Dominik Vogt
2022-10-06  4:34             ` Bart Schaefer
2022-10-06  9:40               ` Peter Stephenson
2022-10-06 10:52                 ` Dominik Vogt
2022-10-06 10:30               ` Dominik Vogt
2022-10-05 20:26 ` Dominik Vogt
2022-10-05 22:16 ` Bart Schaefer
2022-10-05 22:32   ` Dominik Vogt
2022-10-06 10:31   ` Dominik Vogt
2022-10-07 11:45 ` Mikael Magnusson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHYJk3T3hzxnoT5QxHnmnk_XFyZuCheZwvLZ8b1zyCqu-o6OAQ@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=dominik.vogt@gmx.de \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).