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

Posted on 2006-05-28
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 45

    Accepted Solution

    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

    Dear Kent-san,

    Thank you very much, it worked!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Video by: Phil
    This video goes over how to configure and start a jail in FreeBSD.  This video is meant to supplement the article included with this course.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now