zoukankan      html  css  js  c++  java
  • linux tail

    tail 命令从指定点开始将文件写到标准输出,使用tail命令的-f选项可以方便的查阅正在改变的日志文件,tail -f filename会把filename里最尾部的内容显示在屏幕上,并且不但刷新,使你看到最新的文件内容。

    实例:循环查看文件内容

    ping 192.168.120.204 > test.log &      //在后台ping远程主机,并输出文件到test.log;这种做法也使用于一个以上的档案监视,用Ctrl+c来终止。

    [root@localhost ~]# ping 192.168.120.204 > test.log &
    [1] 11891
    [
    root@localhost ~]# tail -f test.log PING 192.168.120.204 (192.168.120.204) 56(84) bytes of data. 64 bytes from 192.168.120.204: icmp_seq=1 ttl=64 time=0.038 ms 64 bytes from 192.168.120.204: icmp_seq=2 ttl=64 time=0.036 ms 64 bytes from 192.168.120.204: icmp_seq=3 ttl=64 time=0.033 ms 64 bytes from 192.168.120.204: icmp_seq=4 ttl=64 time=0.027 ms 64 bytes from 192.168.120.204: icmp_seq=5 ttl=64 time=0.032 ms 64 bytes from 192.168.120.204: icmp_seq=6 ttl=64 time=0.026 ms 64 bytes from 192.168.120.204: icmp_seq=7 ttl=64 time=0.030 ms 64 bytes from 192.168.120.204: icmp_seq=8 ttl=64 time=0.029 ms 64 bytes from 192.168.120.204: icmp_seq=9 ttl=64 time=0.044 ms 64 bytes from 192.168.120.204: icmp_seq=10 ttl=64 time=0.033 ms 64 bytes from 192.168.120.204: icmp_seq=11 ttl=64 time=0.027 ms [root@localhost ~]#
  • 相关阅读:
    C++ 类型别名typedef和using
    网页布局及响应式
    js上传图片预览
    bootstrap中-webkit-text-size-adjust :not()
    开始
    通过setDB2Client*来方便的使用TRACE调优jdbc程序
    关于携程的信息泄漏
    如何设置DB2I(SPUFI)来正常工作
    Limit the query running time with Resource limit facility (RLF)
    z/os上的tar和gzip(3)
  • 原文地址:https://www.cnblogs.com/wakey/p/4231808.html
Copyright © 2011-2022 走看看