8

我想知道是否有人尝试将他们的 gnu-screen 会话记录到日志文件(默认 screenlog.N 除外,其中 N 是会话号)。

我尝试执行以下操作

~$ screen -L custom_screenlog -S test_session

但屏幕会终止。它也不在屏幕手册中。尝试搜索谷歌,我似乎看不到答案。

谢谢。

4

1 回答 1

16

My 4.0.2 version of GNU screen has no argument to -L switch. The log file is systematically named screenlog.0 and created in the current directory. Then you may simply try:

screen -L -S test_session

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

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

This way log files may be stored in a predefined directory (/tmp in this example) and may be named after logfile opening date

于 2012-08-22T13:33:49.087 回答