码迷,mamicode.com
首页 > 系统相关 > 详细

linux 学习笔记六 tail 命令

时间:2015-01-31 01:38:22      阅读:207      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!