4

我已经设置了一个这样的屏幕 rc 文件:

log on
shelltitle apt
logfile $HOME/configs/screen/screenlogs/apt.log
logtstamp after 120

我是这样开始的:

screen -c ~/configs/screen/apt.rc

但是使用一段时间后,apt.log 文件永远不会创建。语法对我来说看起来很完美,除非我没有得到关于日志文件语法的东西

4

1 回答 1

7

You simply need to change

log on

to

deflog on

The log command sets logging for the current window. At the time the .rc file is read, there is no current window. deflog sets the default for logging of newly created windows.

Alternatively you could add commands to your rc file to create an initial window and turn logging on for it.

(Damn, screen does everything.)

于 2012-04-08T09:03:32.413 回答