[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: screen - bash history
From: |
Dave Woodfall |
Subject: |
Re: screen - bash history |
Date: |
Sun, 7 Nov 2021 07:56:03 +0000 |
On 07/11/21 09:29,
Vishal Priyatham <priyatham43d@gmail.com> put forth the proposition:
> 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
Hi Vishal
Screen has a history command for typed commands. From the manual:
history
Usually users work with a shell that allows easy access to previous
commands.
For example csh has the command "!!" to repeat the last command executed.
Screen
allows you to have a primitive way of re-calling "the command that started
...":
You just type the first letter of that command, then hit `C-a {' and screen
tries
to find a previous line that matches with the `prompt character' to the left
of
the cursor. This line is pasted into this window's input queue. Thus you have
a
crude command history (made up by the visible window and its scrollback buffer).
C-a {, (history) Copy and paste a pre‐
C-a } vious (command) line.
It's usually a bit easier to work with your shell's own history feature though.
Hope this helps.
--
Dave
Re: screen - bash history, Tim Daneliuk, 2021/11/07