Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Profanity is the one language all programmers know best.


devel / comp.unix.shell / the most foolproof method to save all shell history

SubjectAuthor
o the most foolproof method to save all shell historyhput

1
the most foolproof method to save all shell history

<87iltj367i.fsf@local.lan>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4953&group=comp.unix.shell#4953

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
From: hpu...@zohomail.com (hput)
Newsgroups: comp.unix.shell
Subject: the most foolproof method to save all shell history
Organization: Still searching...
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Message-ID: <87iltj367i.fsf@local.lan>
Cancel-Lock: sha1:YTE86uI66OCLJLcLsioCP37f530=
MIME-Version: 1.0
Content-Type: text/plain
Lines: 40
X-Complaints-To: abuse@easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 12 Feb 2022 20:28:49 -0500
X-Received-Bytes: 2158
 by: hput - Sun, 13 Feb 2022 01:28 UTC

OS=Ubuntu-21.10
shell=Bash and more ksh93 for scripting

I've seen a few ways described to keep your shell history of all shells
and add it together best as can be hoped as you go.

I had something that seemed to be working for at least a few months.

It was plagiarized from the internet some time ago.
Probably was at least 1.5 yrs ago.

At some point every thing at the commented section shown below:

## PROMPT_COMMAND="$PROMPT_COMMAND;history -a" ; export PROMPT_COMMAND

and a few more I don't remember and are gone from my .bashrc file now.
(May have just been commented lines.)

And related history stuff in .bashrc:

HISTIGNORE='ls:cd:clear:fg:exit';export HISTIGNORE
HISTCONTROL='ignoreboth';export HISTCONTROL
HISTSIZE='30000';export HISTSIZE
HISTFILESIZE='300000';export HISTFILESIZE
HISTFILE=~/.bash_history;export HISTFILE

Seemed to be working for a while anyway.

What started happening was the PROMPT_COMMAND line and seems there were a
few more started showing up in every command I tried to run or when
ever a terminal was started.

I never figured out what was doing that, tried may different
combinations. Including stuff from google.

After tinkering for a while and not getting it right I just commented
it out and have just been using `shopt -s histappend'

Maybe I'm just daydreaming, but I wonder if there are tried and tested
ways to get the maximum possible history saved?

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor