From ccbfce79f62e65e87bf861354219e6dc344340b1 Mon Sep 17 00:00:00 2001 From: trimstray Date: Mon, 18 Mar 2019 10:51:55 +0100 Subject: [PATCH] added 'script' command one-liner - signed-off-by: trimstray --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index c2a1beb..dfcb77e 100644 --- a/README.md +++ b/README.md @@ -1017,6 +1017,7 @@ Linux Security Expert - trainings, howtos, checklists, security tools an * [who](#tool-who) * [last](#tool-last) * [screen](#tool-screen) + * [script](#tool-script) * [du](#tool-du) * [inotifywait](#tool-inotifywait) * [openssl](#tool-openssl) @@ -1556,6 +1557,24 @@ screen -d -m [] ___ +##### Tool: [script](https://en.wikipedia.org/wiki/Script_(Unix)) + +###### Record and replay terminal session + +```bash +### Record session +# 1) +script -t 2>~/session.time -a ~/session.log + +# 2) +script --timing=session.time session.log + +### Replay session +scriptreplay --timing=session.time session.log +``` + +___ + ##### Tool: [du](https://en.wikipedia.org/wiki/GNU_Screen) ###### Show 20 biggest directories with 'K M G'