如何将所有日志文件拖放到文件夹和子文件夹中? [英] How to tail all the log files inside a folder and subfolders?

查看:172
本文介绍了如何将所有日志文件拖放到文件夹和子文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux中,使用命令 tailf ,如何可以拖放一个文件夹和子文件夹中的几个日志文件?


<要记录文件夹中的所有文件,您可以转到该文件夹​​并写入

 >  tailf * .log 

要将子文件夹添加到tailf命令,请使用

  tailf ** / *。log 

而不是 tailf ,也可以使用 tail -f 。当然,正则表达式可以改进以仅匹配特定的文件名。


In Linux, using the command tailf, how can I tail several log files that are inside a folder and in the subfolders?

解决方案

To log all the files inside a folder, you can go to the folder and write

tailf *.log

To add the subfolders to the tailf command, use

tailf **/*.log

Instead of tailf you can also use tail -f. Of course, the regular expression can be improved to match only specific file names.

这篇关于如何将所有日志文件拖放到文件夹和子文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆