head(查看前几行), tail(查看末尾几行) 例子1:查看/etc/profile的前10行内容,应该是: head -n 10 /etc/profile 例子2:查看/etc/profile的最后8行内容,应该是: tail -n 8 /etc/profile 如果想同时查看可以将前10行和后5行的显示信息通过输出重定向的方法保存到一个文档,这样查看文档即可一目了然。 例子3:将内容输出到/home/test文件中 head -n 10 /etc/profile &g