|

楼主 |
发表于 2009-9-3 09:57:08
|
显示全部楼层
今天特殊一点,来学两个命令,因为这两个命令比较简单。。
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 输出版本信息并退出 |
|