Re: screen - bash history

Roger <[email protected]> Mon, 8 Nov 2021 22:53:28 -0500
Newsgroups gmane.comp.gnu.screen.user
Message-ID <[email protected]>
I have frequently noticed GNU Screen with multiple Bash shells, each shell/tab, 
the history is routinely forgotten/lost.

A possible solution is to increase Bash history command and file size:

Here I increased from 150 to 15,000(lines/MB)

export HISTSIZE=15000
export HISTFILESIZE=15000

Sort of ridiculous, and I think the cause is more related to not safely exiting each shell/tab prior to halt.

Maybe the proper method to halt a system is to send a signal to GNU Screen, and place it within a halt.sh script?

Roger

> On Sun, Nov 07, 2021 at 06:20:08PM +0400, Vishal Priyatham wrote:
>   Thanks Robin for the reply.Â
>   looks like we lost the history then as the screen session killed
>   now. Â
>   Regards,
>   Vishal
>
>   On Sun, Nov 7, 2021 at 10:28 AM Robin Lee Powell
>   <[email protected]> wrote:
>
>     Well, the normal shell history stuff.
>     As far as screen goes, you can dump the scrollback and search for
>     your shell prompt, but that's about it.
>     On Sun, Nov 07, 2021 at 09:29:12AM +0400, Vishal Priyatham wrote:
>     > Hi team,
>     >
>     > We are using screen utility on linux server for one of our
>     projects.
>     > We have some issue related to our application and wanted to check
>     what were
>     > some of the commands run in the past which caused the issue.
>     > Is there a way to know the commands run inside the screen session?
>     >
>     >
>     > Regards,
>     > Vishal
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCAAdFiEE9RWsHyMf/E7wvN52Bs6g7OKIfHUFAmGJ8LUACgkQBs6g7OKI
fHXLwAf+PwNM5NcteoBN8nkRWILllO6HYFJdUey3XZVtg83hWW+kyqBm/XCk0Kge
Bp75GNQi2G/4zhHrsUEFfMPNUS5fWZ85YFxk0iSd5faqJeDl7bM/H9CFdImdWHsV
vq/Lms2O7uMEAYsn6yRchxyT1a029gRdfjpHsVKWQhnChCvoCDgLtp7yA49c2gPe
lYOTBaMgkX1OZmmNK+n4koPzIvB1AWMnvKRFC7x4xNA/IdKvSPk7zPmUZeugobkf
8sb7uMkIETV6FDS/muXpYlCPKRJNSqQkZTeQoIY3vybAzH9r3WaAWzPJqSlEISmq
8TdD6wKnBsUGQxJSh4/ERP2hGd8kdw==
=HIEg
-----END PGP SIGNATURE-----