0

How can I take the input and the output of a terminal? To be more specific, what I want to do is to take everything that is typed in the terminal, and everything that the "terminal" types (in real time).

2 Answers 2

2

script should be what you are looking for (man page).

Start a logged session with script /path/to/your/logfile, every command and its output will be logged into the logfile.

If you need timing info for a realistic replay, use script -t=/path/to/your/timingfile /path/to/your/logfile. Afterwards, you can replay the log using scriptreplay /path/to/your/timingfile /path/to/your/logfile.

0

Copy/paste method usually works for simple input/output.

In case you'd like to monitor what's going on within another terminal window try tmux.

You may find more here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .