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 New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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 hosting@LinuxForum.com.



    can anyone help?
  2. Rob

    Rob Administrator Staff Member

    Messages:
    576
    Likes Received:
    234
    Trophy Points:
    43
    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