欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

linux shell腳本學(xué)習(xí)錄制與回放終端會(huì)話

 更新時(shí)間:2013年12月20日 09:16:02   作者:  
這篇文章主要介紹了linux錄制與回放終端會(huì)話實(shí)例,大家參考使用吧

復(fù)制代碼 代碼如下:

amosli@amosli-pc:~/learn$ script -t 2> timing.log -a output.session#開(kāi)始錄制
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
user    0m0.000s
sys    0m0.000s
amosli@amosli-pc:~/learn$ date
2013年 12月 20日 星期五 01:06:41 CST
amosli@amosli-pc:~/learn$ exit
exit #結(jié)束錄制
Script done, file is output.session



播放錄制:

復(fù)制代碼 代碼如下:

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
user    0m0.000s
sys    0m0.000s
amosli@amosli-pc:~/learn$ date
2013年 12月 20日 星期五 01:06:41 CST
amosli@amosli-pc:~/learn$ exit
amosli@amosli-pc:~/learn$

進(jìn)行多個(gè)用戶(hù)之間進(jìn)行廣播視頻會(huì)話:打開(kāi)兩個(gè)終端

(1)在終端1中輸入以下命令:

復(fù)制代碼 代碼如下:

mkfifo scriptfifo

(2)在終端2中輸入以下命令:

復(fù)制代碼 代碼如下:

cat scriptfifo

(3)返回終端1,輸入以下命令:

復(fù)制代碼 代碼如下:

script -f scriptfifo
commands...

這樣就實(shí)現(xiàn)了廣播,在線課堂類(lèi)的作用,非常神奇?。?/P>

我自己實(shí)驗(yàn)的輸出:

復(fù)制代碼 代碼如下:

終端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:
amosli@amosli-pc:~$ cat scriptfifo
Script started on 2013年12月20日 星期五 01時(shí)21分19秒
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:~$

相關(guān)文章

  • 隱藏shell腳本內(nèi)容的工具?shc詳解

    隱藏shell腳本內(nèi)容的工具?shc詳解

    本文主要介紹了隱藏shell腳本內(nèi)容的工具?shc,?雖然它加密的安全性不高,但是我們平??梢园阉鳛橐粋€(gè)shell腳本代碼隱藏和混淆工具來(lái)使用,對(duì)shell腳本隱藏相關(guān)知識(shí)感興趣的朋友一起看看吧
    2021-11-11
  • ubuntu中root和普通用戶(hù)切換方法(推薦)

    ubuntu中root和普通用戶(hù)切換方法(推薦)

    下面小編就為大家?guī)?lái)一篇ubuntu中root和普通用戶(hù)切換方法(推薦)。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-08-08
  • linux重啟和關(guān)閉系統(tǒng)命令的寫(xiě)法

    linux重啟和關(guān)閉系統(tǒng)命令的寫(xiě)法

    這篇文章給大家介紹了linux重啟和關(guān)閉系統(tǒng)命令的寫(xiě)法,然后在文中給大家分享了linux五個(gè)重啟命令,感興趣的朋友一起看看吧
    2017-10-10
  • linux mkdir命令詳解

    linux mkdir命令詳解

    Mkdir 是一個(gè)用來(lái)在 Linux 系統(tǒng)下創(chuàng)建目錄的命令。此命令屬于內(nèi)建命令。接下來(lái)通過(guò)本文給大家分享linux mkdir命令詳解,感興趣的朋友一起看看吧
    2017-09-09
  • shell腳本編程之循環(huán)語(yǔ)句

    shell腳本編程之循環(huán)語(yǔ)句

    這篇文章主要介紹了shell腳本編程之循環(huán)語(yǔ)句的相關(guān)資料,需要的朋友可以參考下
    2016-01-01
  • 淺談ctrl+c,ctrl+d,ctrl+z在linux中的意義

    淺談ctrl+c,ctrl+d,ctrl+z在linux中的意義

    下面小編就為大家?guī)?lái)一篇淺談ctrl+c,ctrl+d,ctrl+z在linux中的意義。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-01-01
  • Linux 中LVS NAT 配置步驟的詳解

    Linux 中LVS NAT 配置步驟的詳解

    這篇文章主要介紹了Linux 中LVS NAT 配置步驟的詳解的相關(guān)資料,這里列出詳細(xì)的實(shí)現(xiàn)步驟,需要的朋友可以參考下
    2017-08-08
  • Linux下JDK中文字體亂碼的解決方法

    Linux下JDK中文字體亂碼的解決方法

    下面小編就為大家?guī)?lái)一篇Linux下JDK中文字體亂碼的解決方法。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-02-02
  • Linux Shell Map的用法詳解

    Linux Shell Map的用法詳解

    這篇文章主要介紹了Linux Shell Map的用法詳解,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-05-05
  • Shell腳本切割tomcat的日志文件

    Shell腳本切割tomcat的日志文件

    這篇文章主要介紹了Shell腳本切割tomcat的日志文件的相關(guān)資料,非常不錯(cuò)具有參考借鑒價(jià)值,需要的朋友可以參考下
    2016-11-11

最新評(píng)論