一起使用手表,表尾和ccze [英] using watch , tail and ccze together
本文介绍了一起使用手表,表尾和ccze的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我像这样一起使用手表和尾巴:
I have used watch and tail together like this:
watch -n 5 tail -n 15 mylogfile.txt
我还使用tail和ccze为日志文件着色,如下所示:
Also I have used tail and ccze for colorizing log file as below:
tail -f -n 50 mylogfile.txt | ccze
但是我不知道如何在一个命令中同时使用所有这三个.有人有什么主意吗?
But I dont know how should I use all of these three together in a single command. Does any one have any idea?
推荐答案
手表的最新版本具有-c | --color
选项,因此也许对您有用:
Recent versions of watch has -c | --color
option, so perhaps this will work for you:
watch -n 5 -c 'tail -f -n 50 mylogfile.txt | ccze'
这篇关于一起使用手表,表尾和ccze的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文