Screen下如何滚动窗口

Linux下的GNU Screen是很好的软件。

参考文章:FAQ: How to scrollback in GNU SCREEN?

如何滚动窗口呢?

首先,进入拷贝模式:

Ctrl + a + [

然后,如下方式移动:

(其实,此时上下左右,PageUp和PageDown都可以用的。)

h -    Move the cursor left by one character
j -    Move the cursor down by one line
k -    Move the cursor up by one line
l -    Move the cursor right by one character
0 -    Move to the beginning of the current line
$ -    Move to the end of the current line.
G -    Moves to the specified line
       (defaults to the end of the buffer).
C-u -  Scrolls a half page up.
C-b -  Scrolls a full page up.
C-d -  Scrolls a half page down.
C-f -  Scrolls the full page down.

拷贝方法:进入拷贝模式后,移动到复制开始点,按空格,再移动到赋值结束点,按空格,完毕。注:无法拷贝到剪贴板,只能在screen窗口间拷贝。

设置Screen的缓存Buffer:

vim ~/.screenrc
#设置screen窗口缓存100万行
defscrollback 40000

Leave a Reply

Your email address will not be published. Required fields are marked *