|
32樓

樓主 |
發(fā)表于 2009-9-3 09:57:08
|
只看該作者
今天特殊一點,來學(xué)兩個命令,因為這兩個命令比較簡單。。
head tail
跟以上的各命令類似,這兩個命令也是查看文件內(nèi)容用的。
head :查看文件開頭的一些內(nèi)容,而不是查看整個文件。這樣的話,我們通過看文件開頭的一點內(nèi)容人就可以大概了解這個文件的內(nèi)容。。
語法:head [- 參數(shù)] 文件
-c, --bytes=[-]N print the first N bytes of each file; 查看文件開頭的n個字節(jié)內(nèi)容
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行的內(nèi)容,不帶參數(shù)時默認顯示前十行內(nèi)容
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 輸出版本信息并退出 |
|