linux 学习笔记六 tail 命令

  #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

posted @ 2015-01-31 00:44  王超_cc  阅读(253)  评论(0编辑  收藏  举报