unix 或 perl 一个衬垫可以同时拖尾多个文件
有人可以帮我想出一个快速的 unix 或 perl one liner 来同时跟踪 Xn 条日志吗? 我只需要在标准输出上快速查看 2 个或更多日志,足够的行可以在我的屏幕上查看。
例如,我使用 tail -30 filename_1.out
,但必须向上箭头并更改 1->2->3。但我真正想做的是一次跟踪其中几个,如果文件名是 filename_1.out
、filename_2.out
、filename_3.out
Can someone help me come up with a quick unix or perl one liner to tail Xn of logs at the same time?
I just need to quickly view 2 or more logs on stdout, enough lines to view on my screen.
I am using tail -30 filename_1.out
for example, but have to arrow up and change the 1->2->3. But I really want to do is tail a couple of few of them in one pass, if the filenames were filename_1.out
,filename_2.out
, filename_3.out
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
tail
可以一次给出多个文件;尝试tail
can be given many files at once; try如果
在特定版本的用户空间工具上不起作用(?)那么你总是可以这样做:
例如跟随尾巴
If
wouldn't work on a particular version of the userland tools (?) then you could always do:
e.g. to follow the tail
如果您的操作系统支持它,请使用 multitail - 这正是您想要的。
If you operating system supports it use multitail - this does exactly what you want.