文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>head and tail

head and tail

时间:2007-02-05  来源:mishuang

head和tail可以显示文件开头和结尾的内容,默认是10行

# head -1 /var/adm/messages   # 显示第一行
# head -2 /var/adm/messages   # 显示前两行
# tail -1 /var/adm/messages   # 显示最后一行
# tail -2 /var/adm/messages   # 显示最后两行

试试下面的例子看看会有什么样的效果
# while true
> do 
>     echo test >> ~/test.txt
>     sleep 1
> done
# tail -f ~/test.txt
相关阅读 更多 +
排行榜 更多 +
西安交大通

西安交大通

生活实用 下载
长江云通

长江云通

生活实用 下载
translatez

translatez

生活实用 下载