Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd please sign up again. Thanks!

How to do this?On the test server, (as a bash one liner)

Discussion in 'Command Line' started by Cowboy1985, Jul 2, 2013.

  1. Cowboy1985

    Cowboy1985 Guest

    On the test server, (as a bash one liner)
    a) Schedule the following task to run hourly
    b) List all users IP�s that experienced a fav icon not found error,
    c) Sort the data by IP Address,
    d) Count the number of time each IP was affected,
    e) Put that report into a file
    f) & email the report to [email protected].

    can anyone help?

  2. Rob

    Rob Guest

    That almost sounds like a homework question :)

    Here are some hints..

    1. You'll want to look in the httpd access log and look for a common string for the fav icon not found error

    2. You'll want to use awk to print the column with the IP.. use uniq to show counts for each one.. use sort to sort by IP or by count

    3. print it to a file

    4. mail the file as an attachment using the mail command

Share This Page