Is it possible to name the 'screen' logfile from the -L flag?

Justin picture Justin · Feb 22, 2013 · Viewed 38.3k times · Source

Upon running Screen with the -L flag, a file called 'screenlog.0' is created and all output written to it (which is great), but I will be running several Screen sessions and I need to identify the logs with a unique number. Is it possible to change the log file name?

Answer

Nan Wang picture Nan Wang · Jun 2, 2018

Probably the easiest way is to use the following:

screen -L -Logfile log_filename your_command