In Linux, using the command tailf
, how can I tail several log files that are inside a folder and in the subfolders?
相关问题
- I want to trace logs using a Macro multi parameter
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
- Django management command doesn't show logging
- Why should we check WIFEXITED after wait in order
相关文章
- how do I log requests and responses for debugging
- Making new files automatically executable?
- Reverse four length of letters with sed in unix
- Compile and build with single command line Java (L
- Android Studio doesn't display logs by package
- Extracting columns from text file using Perl one-l
- Problem with piping commands in C
- How to update command line output?
If all log files doesn't have same extension. You can use following command.
This way find files recursively, print lines starting on line 5 in the each file and save on concat.txt
This will recursively find all *.log files in current directory and its subfolders and tail them.
find . -type f \( -name "*.log" \) -exec tail -f "$file" {} +
To log all the files inside a folder, you can go to the folder and write
To add the subfolders to the tailf command, use
Instead of
tailf
you can also usetail -f
. Of course, the regular expression can be improved to match only specific file names.