|
今天特殊一點,來學兩個命令,因為這兩個命令比較簡單。。
head tail
跟以上的各命令類似,這兩個命令也是查看文件內容用的。
head :查看文件開頭的一些內容,而不是查看整個文件。這樣的話,我們通過看文件開頭的一點內容人就可以大概了解這個文件的內容。。
語法:head [- 參數] 文件
-c, --bytes=[-]N print the first N bytes of each file; 查看文件開頭的n個字節內容
with the leading `-', print all but the last
N bytes of each file
-n, --lines=[-]N print the first N lines instead of the first 10;查看文件開頭n行的內容,不帶參數時默認顯示前十行內容
with the leading `-', print all but the last
N lines of each file
-q, --quiet, --silent never print headers giving file names
-v, --verbose always print headers giving file names
--help 顯示此幫助信息并退出
--version 輸出版本信息并退出 |
|