Can I name the screen file "screen" from the -L flag?

When you start the screen with the -L flag, a file called “screenlog.0” is created, and all the output is written to it (which is fine), but I will start several screen sessions, and I need to identify the logs with a unique number. Can I change the name of the log?

+10
linux logging screen
Feb 22 '13 at 14:17
source share
3 answers

You can edit your .screenrc file and add something like this

logfile / tmp / myownlog

Edit: already answered: https://serverfault.com/questions/248193/specifying-a-log-name-for-screen-output-without-relying-on-screenrc

+6
Feb 22 '13 at 14:19
source share

Alternatively, there is a way to do this online.

Enter command mode on the screen with Ctrl + a logfile and use the logfile command with the name of the file you want as an argument, for example: logfile whatevernameyoulike.log

Source: Screen

+3
Jun 21 '15 at 17:47
source share

Use the script command inside the screen session.

+2
Feb 22 '13 at 14:28
source share



All Articles