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

ε祈祈猫儿з 提交于 2019-12-03 01:31:07
Eun

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

Nan Wang

Probably the easiest way is to use the following:

screen -L -Logfile log_filename your_command
Juan Enciso

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, eg: logfile whatevernameyoulike.log

Source: screen man page

Use script command inside your screen session.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!