6月 082011
 

在使用tail -f命令时是可以及时看到文件的变化的,但是如果再加上一个grep命令,可能看到的就不那么及时了,因为grep命令在buffer写不满时就不输出,可以通过选项  –line-buffered 来搞定,如:

tail -f file.txt | grep something  –line-buffered

 Posted by at 上午 10:23

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据