国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦>學(xué)習(xí)電腦>操作系統(tǒng)>Linux教程>

    linux記錄操作命令

    時間: 佳洲1085 分享

      在linux終端下,為方便檢查操作中可能出現(xiàn)的錯誤,我們可以把操作日志記錄下來。那么我們應(yīng)該使用那條命令才能記錄操作呢?下面由學(xué)習(xí)啦小編為大家整理了linux記錄操作命令的相關(guān)知識,希望大家喜歡!

      linux記錄操作命令1. screen — screen manager with VT100/ANSI terminal emulatio

      > screen -L

      >這里是我們的操作

      > exit

      結(jié)束后會生成一個類似這樣的文件名: screenlog.0

      > more screenlog.0

      這樣可以查看你剛才進(jìn)行的操作,發(fā)現(xiàn)可能存在的問題

      linux記錄操作命令2. script — make typescript of terminal session

      > script

      >我們的操作

      > exit

      生成一個這樣的文件:typescript

      > more typescript

      這里查看我們進(jìn)行的操作

      linux記錄操作命令3. tee – read from standard input and write to standard output and files

      這個命令可以讀取終端輸入輸出到終端或者文件中,有時候可以用來記錄make等命令可能產(chǎn)生的輸出到終端的大量內(nèi)容輸出到文件中去。這樣可以方便記錄這些命令的日志。

      > make 2>&1 | tee make.log

      當(dāng)然,我們也可以直接重定向到一個文件中

      > make > make.log

      PS: 2>&1是為了記錄錯誤日志

      if you want to filter the control symbols, try to use the “col” command like this:

      $ cat screenlog.0 | col -b > screenlog

      or

      $ cat typescript | col -b > scriptlog

    3599525