Linux screen模式下运行文件


linux screen下运行文件
screen下执行文件: screen → 运行 php ***.php > ***.log
退出执行界面: ctrl+A → D
实时查看日志文件内容:tail -f ***.log
列出所有screen进程: screen -ls
查看单个进程: screen -r +进程id
关闭当前进程: exit 


杀死一个已经detached的screen会话
[root@localhost ~]# screen -ls
There are screens on:
9975.pts-0.localhost (Detached)
4588.pts-3.localhost (Detached)
2 Sockets in /var/run/screen/S-root.


[root@localhost ~]# screen -X -S 4588 quit
[root@localhost ~]# screen -ls

There is a screen on:
9975.pts-0.localhost (Detached)
1 Socket in /var/run/screen/S-root.

你可能感兴趣的:(linux)