国产宅男网站在线|亚洲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 cat命令參數(shù)

    時(shí)間: 志藝942 分享

      顯示或者把多個(gè)文本文件連接起來。cat是concatenate的簡(jiǎn)寫,類似于dos下面的type命令。那么你知道什么是Linux cat命令參數(shù)么?接下來是小編為大家收集的Linux cat命令參數(shù),歡迎大家閱讀:

      Linux cat命令參數(shù)

      使用方式:cat [-AbeEnstTuv] [--help] [--version] fileName

      說明:把檔案串連接后傳到基本輸出(螢?zāi)换蚣?> fileName 到另一個(gè)檔案)

      參數(shù):

      -n 或 --number 由 1 開始對(duì)所有輸出的行數(shù)編號(hào)

      -b 或 --number-nonblank 和 -n 相似,只不過對(duì)于空白行不編號(hào)

      -s 或 --squeeze-blank 當(dāng)遇到有連續(xù)兩行以上的空白行,就代換為一行的空白行

      -v 或 --show-nonprinting

      范例:

      cat -n textfile1 > textfile2 把 textfile1 的檔案內(nèi)容加上行號(hào)后輸入 textfile2 這個(gè)檔案里

      cat -b textfile1 textfile2 >> textfile3 把 textfile1 和 textfile2 的檔案內(nèi)容加上行號(hào)(空白行不加)之后將內(nèi)容附加到 textfile3 里。

      范例:

      把 textfile1 的檔案內(nèi)容加上行號(hào)后輸入 textfile2 這個(gè)檔案里

      cat -n textfile1 > textfile2

      把 textfile1 和 textfile2 的檔案內(nèi)容加上行號(hào)(空白行不加)之后將內(nèi)容附加到 textfile3 里。

      cat -b textfile1 textfile2 >> textfile3

      cat /dev/null > /etc/test.txt 此為清空/etc/test.txt檔案內(nèi)容

      cat 也可以用來制作 image file。例如要制作軟碟的 image file,將軟碟放好后打

      cat /dev/fd0 > OUTFILE

      相反的,如果想把 image file 寫到軟碟,請(qǐng)打

      cat IMG_FILE > /dev/fd0

      注:

      1. OUTFILE 指輸出的 image 檔名。

      2. IMG_FILE 指 image file。

      3. 若從 image file 寫回 device 時(shí),device 容量需與相當(dāng)。

      4. 通常用在制作開機(jī)磁片。

      
    看了“Linux cat命令參數(shù)”還想看:

    1.Linux cat命令參數(shù)介紹

    2.Linux cat命令怎么使用

    3.cat命令應(yīng)該怎么用

    4.Linux下如何使用cat命令

    2919655