在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
复制代码 代码如下: amosli@amosli-pc:~/learn$ script -t 2> timing.log -a output.session#开始录制 Script started, file is output.session amosli@amosli-pc:~/learn$ hello1 No command 'hello1' found, did you mean: Command 'hello' from package 'hello-debhelper' (main) Command 'hello' from package 'hello' (main) hello1: command not found amosli@amosli-pc:~/learn$ who amosli tty7 2013-12-19 22:58 amosli pts/1 2013-12-19 22:59 (:0.0) amosli pts/2 2013-12-19 23:16 (:0.0) amosli@amosli-pc:~/learn$ time real 0m0.000s 播放录制: 复制代码 代码如下: amosli@amosli-pc:~/learn$ scriptreplay timing.log output.session #按播放命令序列输出 amosli@amosli-pc:~/learn$ hello1 No command 'hello1' found, did you mean: Command 'hello' from package 'hello-debhelper' (main) Command 'hello' from package 'hello' (main) hello1: command not found amosli@amosli-pc:~/learn$ who amosli tty7 2013-12-19 22:58 amosli pts/1 2013-12-19 22:59 (:0.0) amosli pts/2 2013-12-19 23:16 (:0.0) amosli@amosli-pc:~/learn$ time real 0m0.000s 进行多个用户之间进行广播视频会话:打开两个终端 (1)在终端1中输入以下命令: 复制代码 代码如下: mkfifo scriptfifo (2)在终端2中输入以下命令: 复制代码 代码如下: cat scriptfifo (3)返回终端1,输入以下命令: 复制代码 代码如下: script -f scriptfifo commands... 这样就实现了广播,在线课堂类的作用,非常神奇!! 我自己实验的输出: 复制代码 代码如下: 终端1: amosli@amosli-pc:~$ mkfifo scriptfifo amosli@amosli-pc:~$ script -f scriptfifo Script started, file is scriptfifo amosli@amosli-pc:~$ who amosli tty7 2013-12-19 22:58 amosli pts/1 2013-12-19 22:59 (:0.0) amosli pts/2 2013-12-20 01:14 (:0.0) amosli pts/4 2013-12-20 01:16 (:0.0) amosli pts/5 2013-12-20 01:20 (:0.0) amosli pts/6 2013-12-20 01:20 (:0.0) amosli@amosli-pc:~$ 终端2: |
请发表评论