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

后端 未结 3 1954
别那么骄傲
别那么骄傲 2020-12-28 14:39

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 a

相关标签:
3条回答
  • 2020-12-28 15:00

    Alternatively, there's a way to do it online.

    Enter command mode in Screen via Ctrl+a, : and use the logfile command with the name of the file you want as argument, for example:

    logfile whatevernameyoulike.log
    

    Source: Screen man page

    0 讨论(0)
  • 2020-12-28 15:11

    Probably the easiest way is to use the following:

    screen -L -Logfile log_filename your_command
    
    0 讨论(0)
  • 2020-12-28 15:24

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

    logfile /tmp/myownlog

    It is also answered at Specifying a log name for screen output without relying on .screenrc.

    0 讨论(0)
提交回复
热议问题