tail -f 和tail -F的区别
发布日期:2021-08-13 19:50:31 浏览次数:8 分类:技术文章

本文共 752 字,大约阅读时间需要 2 分钟。

http://flume.apache.org/FlumeUserGuide.html

flume抓取 exec 的command 官网有如下建议:

 

以下内容来自:http://blog.163.com/yinlong_bgp/blog/static/21733277201031503321806/

tail -f,当文件被删除或移走后,即使重新创建的文件也不会再出现新文件内容。如下

  (第一个窗口)
  [root@cftest2 ~]# tail -f messages.3
  helll test2
 
  (第二个窗口)
  [root@cftest2 ~]# rm messages.3
  rm: remove regular file `messages.3'? y
  [root@cftest2 ~]# echo "helll test3">>messages.3
  但是第一个窗口的tail -f 命令不会出现 hello test3
tai -F :当文件删除或者移走后仍然追踪此文件,此时重新创建文件,会继续显示内容:
  [root@cftest2 ~]# tail -F messages.3
   helll test1
   tail: `messages.3' has become inaccessible: No such file or directory
   tail: `messages.3' has appeared;  following end of new file
   helll test2
可以看到,中间删除了messages.3,但重新创建后并输入helll test2,会继续显示出来。

转载于:https://www.cnblogs.com/sunxucool/p/3954059.html

转载地址:https://blog.csdn.net/weixin_30699235/article/details/99125801 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:配置Samba(CIFS)
下一篇:从远程库克隆

发表评论

最新留言

路过,博主的博客真漂亮。。
[***.116.15.85]2024年04月03日 06时48分26秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章