在CentOS 6.x/7.x 安装了Screen之后,如何记录screen启动的log呢?
很简单,分两步走:
- 修改配置,配置我们的logfile目录
vim /etc/screenrc
在最下面增加一行:
# logfile配置了生成日志的目录以及生成文件名规则,可自行更改 logfile '~/log/screen_%H_%m%d%Y_%0c-%t.%n'
- 启动screen加入参数
启动时添加选项-L
例如:
screen -U -S test -d -m -L ./program
更多可以参考如下:
文章的脚注信息由WordPress的wp-posturl插件自动生成
微信扫一扫,打赏作者吧~
![[已解决]nc命令报错 close: Bad file descriptor](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2022/03/Snipaste_2022-03-18_20-16-48.png&w=280&h=210&zc=1)
![[已解决]SecureCRT/SSH 连接Linux缓慢](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2020/07/ssh_slow.jpg&w=280&h=210&zc=1)
![[转载]Linux的tickless设置](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.litrin.net/wp-content/uploads/2018/11/kernel_menuconfig_tickless-1.png&w=280&h=210&zc=1)