婷婷综合国产,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
    国产精品一区二区久久不卡| 色8久久精品久久久久久蜜| 粗大黑人巨茎大战欧美成人| 欧洲中文字幕精品| 国产欧美综合色| 亚洲一卡二卡三卡四卡无卡久久| 国产一区二区三区高清播放| 91国产丝袜在线播放| 国产女主播视频一区二区| 久久不见久久见免费视频1| 欧美日韩一级视频| 日韩美女啊v在线免费观看| 国产精品一区二区男女羞羞无遮挡| 欧美二区乱c少妇| 一区二区久久久| 91蜜桃婷婷狠狠久久综合9色| 国产欧美日产一区| 国产一区二区免费在线| 精品久久久久久亚洲综合网| 日日夜夜精品免费视频| 欧美日韩激情一区二区三区| 亚洲精品国产高清久久伦理二区| 成人视屏免费看| 精品国产乱子伦一区| 麻豆国产精品官网| 91精品久久久久久久91蜜桃| 粉嫩av亚洲一区二区图片| 日韩一区日韩二区| 精品少妇一区二区三区视频免付费| 爽好多水快深点欧美视频| 日韩精品综合一本久道在线视频| 在线观看日韩国产| 国产专区欧美精品| 国内精品免费**视频| 日韩在线观看一区二区| 亚洲国产三级在线| 中文字幕一区在线观看视频| 99久久久精品| 日韩电影网1区2区| 久久久久国产精品麻豆ai换脸| 国产麻豆9l精品三级站| 经典三级在线一区| 视频一区中文字幕| 欧美日高清视频| 久久久777精品电影网影网 | 精品在线一区二区三区| 亚洲精品久久7777| 亚洲日本韩国一区| 亚洲天堂2014| 国产精品久久久久久久蜜臀| 国产亚洲一区二区在线观看| wwwwww.欧美系列| 欧美精品一二三| 精品国产凹凸成av人导航| 久久久www成人免费无遮挡大片| 日韩视频免费观看高清完整版| 日韩网站在线看片你懂的| 欧美va在线播放| 久久精品无码一区二区三区| 亚洲美女一区二区三区| 亚洲综合色自拍一区| 亚洲成精国产精品女| 日韩国产欧美视频| 欧美美女视频在线观看| 精品三级在线观看| 岛国精品在线观看| 久久亚洲一级片| 国内久久精品视频| 欧美日韩免费不卡视频一区二区三区| 国产精品91xxx| 日本精品视频一区二区| 9191精品国产综合久久久久久| 污片在线观看一区二区| 日本一区二区在线不卡| 成人免费在线视频观看| 99国产精品久久久久久久久久| 亚洲国产成人tv| 日本一二三四高清不卡| 欧美日韩另类国产亚洲欧美一级| 国产麻豆欧美日韩一区| 图片区日韩欧美亚洲| 国产精品国产馆在线真实露脸| 欧美日本视频在线| 成人h版在线观看| 午夜欧美2019年伦理| 成av人片一区二区| 国产精品乱码妇女bbbb| 美女高潮久久久| www国产精品av| 免费观看日韩av| xnxx国产精品| 欧美亚洲一区二区三区四区| 日本强好片久久久久久aaa| 亚洲视频综合在线| 国产一区不卡精品| 日韩成人精品在线| 午夜视频一区二区三区| 亚洲成人精品一区二区| 亚洲成人免费电影| 亚洲一区二区黄色| 精品成a人在线观看| 黑人巨大精品欧美黑白配亚洲| 日韩欧美黄色影院| 日本成人在线视频网站| 亚洲人快播电影网| 久久免费视频一区| 一区二区三区91| 欧美视频日韩视频在线观看| 成人av在线资源网| 成人丝袜高跟foot| 成人av资源网站| 99精品桃花视频在线观看| 99精品在线观看视频| 一本大道久久a久久精二百 | 国产精品一品视频| 国产一区二区在线看| 国产精品99久久久久久似苏梦涵 | 色婷婷久久综合| 色综合 综合色| 欧美亚洲一区二区在线观看| 欧美视频三区在线播放| 欧美一区二区三区播放老司机| 日韩欧美一区二区三区在线| www激情久久| 国产精品精品国产色婷婷| 樱桃视频在线观看一区| 亚洲综合图片区| 美女免费视频一区| 顶级嫩模精品视频在线看| 99久久精品国产一区| 色综合激情久久| 欧美一区二区成人| 国产农村妇女精品| 亚洲午夜精品网| 韩国视频一区二区| 91日韩精品一区| 欧美一级日韩免费不卡| 国产日韩精品一区二区浪潮av| 国产精品久久看| 亚洲国产wwwccc36天堂| 国产真实乱对白精彩久久| 色偷偷88欧美精品久久久| 在线成人午夜影院| 中文字幕免费不卡| 亚洲mv大片欧洲mv大片精品| 激情综合色丁香一区二区| a级精品国产片在线观看| 成人的网站免费观看| 国产欧美日产一区| 亚洲免费av高清| 蜜臀国产一区二区三区在线播放 | 日本大胆欧美人术艺术动态| 国产乱色国产精品免费视频| 欧美三区免费完整视频在线观看| 精品免费视频.| 亚洲国产欧美在线人成| 国产成人久久精品77777最新版本| 欧美日韩一区二区欧美激情| 国产精品久久影院| 久久成人免费日本黄色| 色诱亚洲精品久久久久久| 欧美精品一区男女天堂| 偷窥少妇高潮呻吟av久久免费| 成人av免费在线| 日韩免费电影一区| 亚洲午夜一区二区三区| 99re成人精品视频| 久久亚洲影视婷婷| 日韩av成人高清| 欧美性淫爽ww久久久久无| 中文字幕日韩精品一区| 久久草av在线| 日韩精品中文字幕在线不卡尤物| 亚洲午夜精品在线| 91国产免费观看| 亚洲同性gay激情无套| 国产成人精品免费看| 欧美成人精品1314www| 日日摸夜夜添夜夜添亚洲女人| 欧美三级日韩三级| 一区二区三区四区国产精品| av在线播放一区二区三区| 中文字幕成人av| 国产69精品久久久久777| 久久久午夜精品| 国产成人免费视频网站| 中文字幕精品一区二区精品绿巨人| 国内精品久久久久影院色| 久久久久久9999| 国产精品自在欧美一区| 26uuu亚洲综合色| 国产精品一区二区久久不卡 | 日韩二区在线观看| 欧美日韩国产高清一区| 亚洲国产aⅴ天堂久久| 欧美日韩精品系列| 日本sm残虐另类| 日韩欧美在线影院| 九九视频精品免费| 久久久蜜桃精品|