script命令可以记录键盘动作以及终端输出等情况
用法如下:
script [-a] [-c COMMAND] [-f] [-q] [-t] [file]可以用下面的方法记录键盘键入字符的情况及时刻,用scriptreplay即可重现该过程
$ script -t 2> timing //将键入时刻及键值保存在timing中
Script started, file is typescript
$ ls
Desktop hax hog.sh My Computer ostg src
$ pwd
/home/jonesy
$ file hax
hax: empty
$ exit
exit
Script done, file is typescript
$ scriptreplay timing //重现上述过程
$ ls
Desktop hax hog.sh My Computer ostg src
$ pwd
/home/jonesy
$ file hax
hax: empty
$ exit
exit
通过合理利用这个功能,可以实现某些自动安装的功能


看完了要说点啥么?