[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Command howto



Michael Magua wrote:
On Tue, Oct 7, 2008 at 8:25 PM, Jim <mickeyboa sbcglobal net <mailto:mickeyboa sbcglobal net>> wrote:

    Thomas Thurman wrote:

        2008/10/7 Jim <mickeyboa sbcglobal net
        <mailto:mickeyboa sbcglobal net>
        <mailto:mickeyboa sbcglobal net
        <mailto:mickeyboa sbcglobal net>>>


           What command can I use to get all the lines in
        /var/log/messages
           that have messages on "bluetoothd" copied into a file called
           "mess" in /home/user/mess  ??


        grep bluetoothd /var/log/messages > /home/user/mess/mess

        assuming you have the rights to read messages and write to mess.

        T

    Craig, Thomas thanks for your help.

    Jim


Can also be done using awk ;)

awk '{ if ($5 ~ /bluetoothd/) print}' /var/log/messages > /home/user/mess/mess

--
Regards,
Michael Magua

RHCE 805008570430920
Thanks, but I didn't didn't want to have to pay $5 to do it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]