On Mon, Jul 22, 2019 at 10:09:06PM +0100, Keith Williams wrote:
I should have logged everything I did really then it
would have been useful
for others.
The "script" command is useful. When you run it, it spawns a new
shell, while logging everything that happens in that shell to a
file.
The trouble with that is that I find I quite often don't realise
that my scrollback buffer is important until after I've already
started.
Fortunately if you use a terminal multiplexer like GNU Screen or
tmux and have it set to have a suitably large scrollback then it's
easy to save that scrollback out to a file for sharing with people.
So
1. Use a terminal multiplexer, and
2. Set its scrollback buffer to a decent size now. :)
Easy to review and share what you typed, then.
= Setting a large scrollback buffer
== GNU Screen: $HOME/.screenrc
defscrollback 10000
== tmux: $HOME/.tmux.conf
set -g history-limit 10000
= Saving scrollback to a file
== GNU Screen
hardcopy -h <filename>
This is typed in command mode which is usually entered by typing
ctrl-a and then ':'.
== tmux
capture-pane -S -10000
save-buffer <filename>
Again this is typed in command mode, two commands, and the default
way to enter that mode in tmux is ctrl-b and then ':'.
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting