4.1.2.5 linux文件管理 :文件屬性操作 :文件內(nèi)容 :統(tǒng)計(jì)字
1. wc命令
1.1 wc命令 - 普通 (wc [file...])
打印行數(shù),單詞數(shù),字節(jié)數(shù)
$ wc 39frpc.log target.txt
0 0 0 39frpc.log
9 9 52 target.txt
9 9 52 總用量
1.2 wc命令 - 打印字節(jié)數(shù) (wc -c [file...])
$ wc -c 39frpc.log target.txt
0 39frpc.log
52 target.txt
52 總用量
1.2 wc命令 - 打印字符數(shù) (wc -m [file...])
$ wc -c 39frpc.log target.txt
0 39frpc.log
52 target.txt
52 總用量
1.3 wc命令 - 打印行數(shù) (wc -l [file...])
$ wc -l 39frpc.log target.txt
0 39frpc.log
9 target.txt
9 總用量
1.4 wc命令 - 打印單詞數(shù)量 (wc -w [file...])
$ wc -w 39frpc.log target.txt
0 39frpc.log
10 target.txt
10 總用量
1.4 wc命令 - 打印最長(zhǎng)行的長(zhǎng)度 (wc -L [file...])
$ wc -L 39frpc.log target.txt
0 39frpc.log
11 target.txt
11 總用量
wc 命令詳解
-c, --bytes print the byte counts ##打印字節(jié)數(shù)
-m, --chars print the character counts ##打印字符數(shù)
-l, --lines print the newline counts ##打印行數(shù)
--files0-from=文件 ##從指定文件讀取以NUL 終止的名稱,如果該文件被
指定為"-"則從標(biāo)準(zhǔn)輸入讀文件名
-L, --max-line-length ##顯示最長(zhǎng)行的長(zhǎng)度
-w, --words ##顯示單詞計(jì)數(shù)
--help ##顯示此幫助信息并退出
▽
head
--version 顯示版本信息并退出