Linux 中screen命令的安装及其使用

安装:
1、下载安装包地址:http://www.rpmfind.net/linux/rpm2html/search.php?query=screen
2、将其解压缩到任何一个bin目录下:tar -zxvf /usr/bin
3、使用包安装指令进行安装:yum install screen
Linux 中screen命令的安装及其使用

使用:
screen为多重视窗管理程序。screen能在一个终端程序执行多个任务,离线执行任务等。

语法: screen [ -options ] [ cmd [ args ] ]
screen -r [[pid.]tty[.host]]
命令行参数: -A
Adapt the sizes of all windows to the size of the current terminal.(将所有的窗口调整为终端的大小)
-d|-D [pid.tty.host]
does not start screen, but detaches the elsewhere running screen session.(不启动屏幕,但是分离在别处运行的会话)
-h num
Specifies the history scrollback buffer to be num lines high.(指明历史缓冲区行数)
-m causes screen to ignore the $STY environment variable. With "screen -m" creation of a new session is enforced,(忽略$STY(screen会话)环境变量,强制创建一个新的会话)
-r sessionowner/[pid.tty.host]
resumes a detached screen session.(恢复离线的会话)
-R attempts to resume the first detached screen session it finds. If successful, all other command-line options are ignored. If no detached session exists, starts a new session using the specified options, just as if -R had not been specified.(先恢复离线,若没有离线则创建新的会话)
-ls [match]
-list [match]
does not start screen, but prints a list of pid.tty.host strings identifying your screen(显示目前所有的screen作业)
sessions.
-wipe [match]
does the same as "screen -ls", but removes destroyed sessions instead of marking them as -S sessionname
When creating a new session, this option can be used to specify a meaningful name for the session.)
-x Attach to a not detached screen session. (Multi display mode). (恢复之前离线的screen作业)
-S sessionname
When creating a new session, this option can be used to specify a meaningful name for the session.( 当创建一个新的会话,给它定义一个名字)

Linux 中screen命令的安装及其使用

上一篇:exploit for Android (adb setuid)


下一篇:Linux笔记:文件压缩解压