首页 > 系统服务 > 详细

linux 学习笔记六 tail 命令

时间:2015-01-31 01:37:17      阅读:293      评论:0      收藏:0      [点我收藏+]

  #tail -f -n100 catalina.out

 含义 从文件尾部监视catalina.out 文件   要看文件尾部100行

 

#tail -f -n100  catalina,out >nohup.out &

                                         -----也可以指定输出文件的路径 

&意味着进入后台

>输出内容到指定文件  覆盖原有文件内容

>>输出内容不覆盖  而是追加内容到原有文件 

 

 

#tail -f -n100 catalina.out >nohup.out& 

等价于

#nohup tail -f -n100 catalina.out >nohup.out &

 

备注 :

 使用进程在登录的用户退出后仍继续执行

nohup 将执行后的数据信息默认存于文件 nohup.out中 

 

例子 :

 nohup find / -name init* >/root /find_init.0113&

nohup sh startup.sh&>nohup.out

linux 学习笔记六 tail 命令

原文:http://www.cnblogs.com/cici-new/p/4263509.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!