婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > Linux文本查看命令及其選項詳解(cat,head,tail)

Linux文本查看命令及其選項詳解(cat,head,tail)

熱門標簽:如何申請400的電話呀 AI智能電銷機器人壞處 黑暗之魂3地圖標注 合肥電銷外呼系統(tǒng)供應商 沈陽ai電銷智能機器人 蘭州電銷機器人加盟 電話機器人對家居行業(yè)幫助大嗎 電商外呼系統(tǒng)排名 地圖標注審核周期

linux系統(tǒng)內置命令可以通過以下兩種方式查詢:“cat --help” 或者“man cat”。

cat命令的常用選項和官方解釋如下:

cat file_name 顯示文件全部內容

cat -b file_name 顯示文件非空行內容

cat -E file_name 在文件每行末尾顯示$,常用于管道功能

cat -n file_name 顯示內容和行號

Usage: cat [OPTION]... [FILE]...
Concatenate FILE(s) to standard output.

With no FILE, or when FILE is -, read standard input.

 -A, --show-all      equivalent to -vET
 -b, --number-nonblank  number nonempty output lines, overrides -n
 -e            equivalent to -vE
 -E, --show-ends     display $ at end of each line
 -n, --number       number all output lines
 -s, --squeeze-blank   suppress repeated empty output lines
 -t            equivalent to -vT
 -T, --show-tabs     display TAB characters as ^I
 -u            (ignored)
 -v, --show-nonprinting  use ^ and M- notation, except for LFD and TAB
   --help   display this help and exit
   --version output version information and exit

Examples:
 cat f - g Output f's contents, then standard input, then g's contents.
 cat    Copy standard input to standard output.

GNU coreutils online help: http://www.gnu.org/software/coreutils/>
Full documentation at: http://www.gnu.org/software/coreutils/cat

head命令及其選項如下:

head -c10 file_name 顯示一開始的10個字節(jié)

head -c-10 file_name 顯示除末尾10個字節(jié)之外的內容

head -n10 file_name 顯示一開始的10行內容

head -n-10 file_name 顯示除末尾的10行之外的內容

Usage: head [OPTION]... [FILE]...
Print the first 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the file name.

With no FILE, or when FILE is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
 -c, --bytes=[-]NUM    print the first NUM bytes of each file;
               with the leading '-', print all but the last
               NUM bytes of each file
 -n, --lines=[-]NUM    print the first NUM lines instead of the first 10;
               with the leading '-', print all but the last
               NUM lines of each file
 -q, --quiet, --silent  never print headers giving file names
 -v, --verbose      always print headers giving file names
 -z, --zero-terminated  line delimiter is NUL, not newline
   --help   display this help and exit
   --version output version information and exit

NUM may have a multiplier suffix:
b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.

GNU coreutils online help: http://www.gnu.org/software/coreutils/>
Full documentation at: http://www.gnu.org/software/coreutils/head

tail命令及其選項如下:

tail -c10 file_name 顯示末尾的10個字節(jié)

tail -c-10 file_name 顯示除開頭10個字節(jié)之外的內容

tail -n10 file_name 顯示末尾的10行內容

tail -n-10 file_name 顯示除開頭的10行之外的內容

Usage: tail [OPTION]... [FILE]...
Print the last 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the file name.

With no FILE, or when FILE is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
 -c, --bytes=[+]NUM    output the last NUM bytes; or use -c +NUM to
               output starting with byte NUM of each file
 -f, --follow[={name|descriptor}]
              output appended data as the file grows;
               an absent option argument means 'descriptor'
 -F            same as --follow=name --retry
 -n, --lines=[+]NUM    output the last NUM lines, instead of the last 10;
               or use -n +NUM to output starting with line NUM
   --max-unchanged-stats=N
              with --follow=name, reopen a FILE which has not
               changed size after N (default 5) iterations
               to see if it has been unlinked or renamed
               (this is the usual case of rotated log files);
               with inotify, this option is rarely useful
   --pid=PID      with -f, terminate after process ID, PID dies
 -q, --quiet, --silent  never output headers giving file names
   --retry       keep trying to open a file if it is inaccessible
 -s, --sleep-interval=N  with -f, sleep for approximately N seconds
               (default 1.0) between iterations;
               with inotify and --pid=P, check process P at
               least once every N seconds
 -v, --verbose      always output headers giving file names
 -z, --zero-terminated  line delimiter is NUL, not newline
   --help   display this help and exit
   --version output version information and exit

NUM may have a multiplier suffix:
b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.

With --follow (-f), tail defaults to following the file descriptor, which
means that even if a tail'ed file is renamed, tail will continue to track
its end. This default behavior is not desirable when you really want to
track the actual name of the file, not the file descriptor (e.g., log
rotation). Use --follow=name in that case. That causes tail to track the
named file in a way that accommodates renaming, removal and creation.

GNU coreutils online help: http://www.gnu.org/software/coreutils/>
Full documentation at: http://www.gnu.org/software/coreutils/tail

搭配管道使用更佳

此外,這三個命令常常與管道功能搭配,用于文件內容的操作,例如:

對data.txt中的數(shù)據(jù)進行排序:cat data.txt | sort

對data.txt中的內容匹配:cat data.txt | grep 'a'

輸出data.txt中的非空行數(shù):cat -b data.txt | wc -l

總結

到此這篇關于Linux文本查看命令及其選項詳解(cat,head,tail)的文章就介紹到這了,更多相關Linux文本查看命令及其選項內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

您可能感興趣的文章:
  • 詳解Linux文本文件與WIN文本文件換行格式轉換命令
  • linux文本過濾grep基礎命令介紹(5)
  • 一天一個shell命令 linux文本操作系列-tac,rev命令詳解
  • 一天一個shell命令 linux文本內容操作系列-awk命令詳解
  • 一天一個shell命令 linux文本內容操作系列-sed命令詳解
  • linux shell命令行選項與參數(shù)用法詳解
  • linux下/etc/passwd文件的選項說明

標簽:隴南 淮南 常州 河北 黔南 通遼 河池 黔南

巨人網絡通訊聲明:本文標題《Linux文本查看命令及其選項詳解(cat,head,tail)》,本文關鍵詞  Linux,文本,查看,命令,及其,;如發(fā)現(xiàn)本文內容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內容系統(tǒng)采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Linux文本查看命令及其選項詳解(cat,head,tail)》相關的同類信息!
  • 本頁收集關于Linux文本查看命令及其選項詳解(cat,head,tail)的相關信息資訊供網民參考!
  • 推薦文章
    婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av
    26uuu色噜噜精品一区二区| 色婷婷综合久色| 午夜精品久久久久影视| 亚洲精品国产第一综合99久久| 日本一二三四高清不卡| 日本一区二区综合亚洲| 国产精品网站在线| 亚洲视频一二区| 依依成人综合视频| 亚洲午夜久久久久久久久电影网| 亚洲图片欧美一区| 麻豆91在线播放| 国产精品亚洲成人| 色综合久久中文字幕综合网| 欧美三级电影网站| 日韩一级二级三级精品视频| 精品欧美一区二区久久| 国产午夜精品一区二区三区四区| 国产精品电影一区二区| 亚洲精品成人a在线观看| 亚洲午夜视频在线| 国产精品一区二区久久精品爱涩| 99视频在线精品| 在线不卡一区二区| 国产亚洲一区二区在线观看| 亚洲欧美另类小说| 精品中文字幕一区二区| caoporen国产精品视频| 欧美日韩一区在线| 欧美经典一区二区三区| 亚洲国产日韩一级| 国产成人av电影免费在线观看| 欧美影院一区二区三区| 久久欧美一区二区| 午夜久久久久久久久久一区二区| 国产专区综合网| 91成人免费在线视频| 久久综合成人精品亚洲另类欧美| 亚洲欧美日韩国产成人精品影院| 韩国一区二区在线观看| 色欧美日韩亚洲| 国产欧美一区二区精品仙草咪| 亚洲一区二区精品视频| 粉嫩av一区二区三区| 欧美精品精品一区| 亚洲激情在线激情| 夫妻av一区二区| 欧美不卡视频一区| 男人的j进女人的j一区| 欧美在线啊v一区| 最新久久zyz资源站| 国产在线精品一区二区不卡了| 欧美人牲a欧美精品| 自拍偷自拍亚洲精品播放| 国产一区二区美女诱惑| 欧美一区二区三区视频在线 | 日韩欧美国产一二三区| 樱花影视一区二区| 99精品在线免费| 日本一区二区成人在线| 国产精品性做久久久久久| 日韩欧美国产三级电影视频| 午夜精品成人在线视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 亚洲国产精品t66y| 国产成人一区在线| 久久五月婷婷丁香社区| 韩国精品一区二区| 久久色在线视频| 国产伦精品一区二区三区在线观看 | 日韩美女视频19| 99久久国产综合精品女不卡| 国产精品乱码一区二区三区软件| 激情欧美一区二区三区在线观看| 欧美大片日本大片免费观看| 日韩av一区二| 91精品蜜臀在线一区尤物| 日韩国产精品久久久久久亚洲| 欧美日韩一卡二卡三卡| 亚洲制服丝袜av| 9191成人精品久久| 久久精品免费观看| 精品国产精品一区二区夜夜嗨| 精品一区二区三区香蕉蜜桃| 久久久亚洲国产美女国产盗摄 | 天天综合色天天综合| 欧美日韩国产一区| 老司机一区二区| 中文字幕不卡在线| 91黄色激情网站| 青娱乐精品视频在线| 久久一日本道色综合| 99国产精品久久久久久久久久| 亚洲电影中文字幕在线观看| 欧美日韩国产欧美日美国产精品| 久久99精品久久久| 国产精品美女视频| 欧美三级韩国三级日本三斤 | 欧美主播一区二区三区| 男女激情视频一区| 国产精品久久久久久久久搜平片| 日本精品裸体写真集在线观看| 奇米精品一区二区三区在线观看一 | 久久久久国产精品人| 91年精品国产| 久久99久久99精品免视看婷婷| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 制服.丝袜.亚洲.中文.综合| 韩日欧美一区二区三区| 一区二区三区四区不卡视频| 精品精品国产高清a毛片牛牛| 成人高清视频在线观看| 免费成人在线影院| 中文字幕日本不卡| 欧美大胆一级视频| 在线观看一区二区精品视频| 国模冰冰炮一区二区| 一区二区三国产精华液| 久久日一线二线三线suv| 欧美三级三级三级爽爽爽| 成人夜色视频网站在线观看| 免费视频最近日韩| 亚洲国产中文字幕在线视频综合| 国产欧美精品一区二区色综合朱莉| 91精品国产福利在线观看| 色999日韩国产欧美一区二区| 国产成人综合在线播放| 免费观看在线综合| 亚洲风情在线资源站| 亚洲日本青草视频在线怡红院| 2019国产精品| 欧美第一区第二区| 欧美日韩国产精品自在自线| 91蝌蚪porny九色| 国产精品一级片| 久久国产精品99精品国产 | 日韩va亚洲va欧美va久久| ...xxx性欧美| 亚洲色图在线看| 日韩一区欧美一区| 亚洲欧洲日韩一区二区三区| 国产欧美1区2区3区| 久久免费看少妇高潮| 久久久91精品国产一区二区精品| 日韩欧美成人一区| 亚洲精品一区二区在线观看| 精品国产伦一区二区三区观看方式| 欧美日韩国产电影| 欧美欧美欧美欧美| 日韩欧美一区二区三区在线| 欧美不卡视频一区| 久久久久久久久伊人| 国产精品三级视频| 亚洲欧美激情小说另类| 亚洲精品欧美综合四区| 亚洲福利一二三区| 日本欧洲一区二区| 精品一区二区免费视频| 国产精品影视在线观看| 成人高清免费观看| 日本精品视频一区二区三区| 欧美精品乱码久久久久久| 日韩一区二区三区免费观看| 久久午夜电影网| 亚洲日本在线天堂| 免费精品视频最新在线| 久久精品av麻豆的观看方式| 成人福利视频在线| 欧美日韩国产一级二级| 久久嫩草精品久久久久| 亚洲老司机在线| 日本视频在线一区| 成人免费看黄yyy456| 欧美三区在线视频| 久久久欧美精品sm网站| 亚洲乱码中文字幕| 麻豆免费精品视频| 99精品一区二区三区| 日韩一区二区三区视频| 国产精品每日更新| 丝袜诱惑亚洲看片| 99久久精品国产麻豆演员表| 欧美一区二区三区小说| 国产精品色哟哟| 看国产成人h片视频| 91麻豆.com| 精品对白一区国产伦| 亚洲人精品一区| 国精产品一区一区三区mba视频| 色天使色偷偷av一区二区| 精品国产欧美一区二区| 亚洲大型综合色站| 99re这里都是精品| 国产日韩欧美精品一区| 五月综合激情婷婷六月色窝| 国产99精品在线观看| 日韩欧美综合在线| 亚洲第一成年网| 91国产精品成人| 国产精品天干天干在线综合|