Screen命令

2010年3月17日 | 分类: Linux | 标签:

打算把所有用到的命令全部详细记录下,方便以后查证!
就先从Screen这个开始吧!

命令: Screen

Use: screen [-opts] [cmd [args]]
 or: screen -r [host.tty]

Options:
-a            Force all capabilities into each window's termcap.
-A -[r|R]     Adapt all windows to the new display width & height.
-c file       Read configuration file instead of '.screenrc'.
-c file       读取指定的配置文件,而不是默认的'~/.screenrc'文件。
-d (-r)       Detach the elsewhere running screen (and reattach here).
-dmS name     Start as daemon: Screen session in detached mode.
-D (-r)       Detach and logout remote (and reattach here).
-D -RR        Do whatever is needed to get a screen session.
-e xy         Change command characters.
-e xy         更改命令字符。
-f            Flow control on, -fn = off, -fa = auto.
-h lines      Set the size of the scrollback history buffer.
-h lines      设置回溯历史缓冲区的大小.
-i            Interrupt output sooner when flow control is on.
-l            Login mode on (update /var/run/utmp), -ln = off.
-list         or -ls. Do nothing, just list our SockDir.
-L            Turn on output logging.
-L            打开日志输出。(日志文件在~/screenlog.0)
-m            ignore $STY variable, do create a new screen session.
-O            Choose optimal output rather than exact vt100 emulation.
-p window     Preselect the named window if it exists.
-q            Quiet startup. Exits with non-zero return code if unsuccessful.
-q            安静模式运行。退出反非零代码为不成功。
-r            Reattach to a detached screen process.
-r            重新打开一个离线的screen进程.
-R            Reattach if possible, otherwise start a new session.
-s shell      Shell to execute rather than $SHELL.
-s shell      指定shell,非系统的$SHELL.
-S sockname   Name this session pid.sockname instead of pid.tty.host.
-S sockname   指定会话名称 pid.sockname。sockname替换 pid 后的 tty.host
-t title      Set title. (window's name).
-t title      设置标题. (窗口的名子).
-T term       Use term as $TERM for windows, rather than "screen".
-T term       指定终端类型。
-U            Tell screen to use UTF-8 encoding.
-U            让screen使用UTF-8编码。
-v            Print "Screen version 4.00.03jw4 (FAU) 2-May-06".
-v            打印版本信息.
-wipe         Do nothing, just clean up SockDir.
-wipe         清理已经死掉的screen.
-x            Attach to a not detached screen. (Multi display mode).
-x            连接到一个在线的screen上,不会将原有的screen关掉。(多显示模式)
-X            Execute cmd as a screen command in the specified session.
-X            指定screen运行一个命令.

组合键说明:
C-a ? 显示所有键绑定信息
C-a w 显示所有窗口列表
C-a C-a 切换到之前显示的窗口
C-a c 创建一个新的运行shell的窗口并切换到该窗口
C-a n 切换到下一个窗口
C-a p 切换到前一个窗口(与C-a n相对)
C-a 0..9 切换到窗口0..9
C-a a 发送 C-a到当前窗口
C-a d 暂时断开screen会话
C-a k 杀掉当前窗口
C-a [ 进入拷贝/回滚模式

目前还没有任何评论.