Custom gnu-screen session log file name

I would like to know if anyone tried to listen to the gnu-screen session in the log file (except for the screenlog.N file, where N is the session number).

I tried to do the following

~$ screen -L custom_screenlog -S test_session 

but the screen will end. This is also not in the on-screen manual. Tried a google search and I don't see the answer.

Thanks.

+7
source share
1 answer

In my version 4.0.2 of the GNU version, there are no arguments for the -L switch. The log file is systematically called screenlog.0 and is created in the current directory. Then you can just try:

 screen -L -S test_session 

Edit: you can customize your .screenrc file by adding, for example,

 logfile /tmp/screenlog-%Y%m%d-%c:%s 

Thus, the log files can be stored in a predefined directory ( /tmp in this example) and can be named after the opening date of the log

+16
source

All Articles