tail multiple text files -> and get all into standard output

Posted on 2006-05-28
Medium Priority
Last Modified: 2010-04-21

In one directory, there are multiple text files (log files)...
For each log, separated processes are appending logs in each.
Like to monitor in real time, easiest way is tail log, but not like to tail each log in separate telnet session, but like to have all log output into standard output (on telnet window).

Then thinking to use grep to get some results..

Is there any simple command? Like.... (it does not work but just like to show what I like to do..)
tail -f *20060529.log | grep ERROR

As far as I know, it may not be possible, but if somebody knows good way to do, would you please suggest?
Question by:sleepingluke
LVL 46

Accepted Solution

Kent Olsen earned 500 total points
ID: 16781449
Hi sleepingluke,

You need to run multiple copies of tail, each processing one log and writing to the same output file.

Try running them in the background.

tail -f 20060527.log &
tail -f 20060527.log &
tail -f 20060529.log &

Good Luck!

Author Comment

ID: 16781531
Dear Kent-san,

Thank you very much, it worked!

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month17 days, 9 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question