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

安裝:
一、下載安裝包地址:http://www.rpmfind.net/linux/rpm2html/search.php?query=screen
二、將其解壓縮到任何一個bin目錄下:tar -zxvf /usr/bin
三、使用包安裝指令進行安裝:yum install screen
Linux 中screen命令的安裝及其使用php

使用:
screen爲多重視窗管理程序。screen能在一個終端程序執行多個任務,離線執行任務等。html

語法: 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

相關文章
相關標籤/搜索