经常用到screen执行python脚本,但是出了问题以后总是找不回来了
script [options] [file]
-a, --append
append the
output
-c, --command run command rather than
interactive shell (直接运行你的命令)
-r, --return
return exit code of the child
process
-f, --flush
run flush after each
write
--force
use output file even when it is a link
-q, --quiet
be quiet
-t, --timing[=] output
timing data to stderr (or to FILE)
-V, --version
output version information and exit
-h, --help
display
this help and exit
-s SPEED Set speed to SPEED [1.0]
-n
No wait mode
-p
Peek another person's ttyrecord
一、笨办法,利用ubuntu的四窗口,将终端拉长,然后向下托,然后再向上拉长,再下托。。。这是最笨的,聪明人会用[Ctrl]
+ [Mouse-A]随便选中窗口都可以拖动。
二、聪明人,在screen执行之前会运行一个命令,script,这个命令可以保存screen所有的打印信息,默认保存在同级目录下的typescripts文件中。
zhipeng@ubuntu:~$ script --help
Usage:
Options:
三、我个人最喜欢的命令 ttyplay ttyrec
(缺点是录制的文件非人类可阅读。。。)
用这个可以用来录制终端类视频的啊,还可以回放输出,加速等等之类的,可以做教程。
usage: ttyrec [-u] [-e command] [-a] [file]
Usage: ttyplay [OPTION] [FILE]
更多使用方法man ttyrec ttyplay
四、不保存文件,直接在screen翻页。
[Ctrl] +
[A],再按[ESC],进入复制模式,默认翻页快捷键是[Ctrl]+[F],[Ctrl]+[B]。我的翻页有好多,ctrl +
d,ctrl +u,shift + 上,shift +下 ....