How to save the output of screen windows to a file on Linux?

In the screen, copying the history of the window output is quite hard. How to save the screen easily to a file?

First type Ctrl + A then : to get to command mode.

In the command mode, execute

hardcopy -h /path/to/file

screen will save the window output to /path/to/file.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *