![](/img/trans.png)
[英]Why is '$_' the same as $ARGV in a Perl one-liner?
[英]unix or perl one liner for tailing more than one file at the same time
有人可以帮我提出一个快速的unix或perl一个衬垫同时尾部Xn的日志吗? 我只需要在stdout上快速查看2个或更多日志,在屏幕上查看足够的行。
我正在使用tail -30 filename_1.out
,但必须向上箭头并更改1-> 2-> 3。 但是如果文件名是filename_1.out
, filename_2.out
, filename_3.out
,我真的想做的就是一次性传递几个尾部。
tail
可以同时给出很多文件; 尝试
tail -30 filename_[123].out
如果
tail -30 filename_*.out
不能用于特定版本的用户工具(?)然后你总是可以这样做:
(for a in filename*.out; do tail -f "$a"& done) | tail -f
例如跟随尾巴
如果你的操作系统支持它使用multitail - 这正是你想要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.