Loading

Linux命令之乐--script和scriptplay

script和scriptplay可以把终端会话记录到一个文件中,可以用来制作命令行教学视屏。

 

开始录制会话

[root@new test]# script -t 2>timing.log -a output.session
Script started, file is output.session
[root@new test]# echo hello
hello
[root@new test]# echo world
world
[root@new test]# pwd
/test
[root@new test]# exit
exit
Script done, file is output.session

 

回放会话

[root@new test]# scriptreplay timing.log output.session 
[root@new test]# echo hello
hello
[root@new test]# echo world
world
[root@new test]# pwd
/test

 

posted @ 2016-08-23 00:04  头痛不头痛  阅读(416)  评论(0编辑  收藏  举报