Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

There's nothing explaining what the numbers to the left of the ip's mean. When I try to get help in linux it doesn't really make it easier either. Is there some sort of definitive manual you would recommend that makes it easier to figure this stuff out?

Quote:

Originally Posted by Tinkster

Hi, welcome to LQ!

I'd suggest you run it, and try to determine what it does by
the results; you may find the man-pages of each of the tools
a great help in understanding what they do.

grep searching the file last10m (a website request log from the looks of it) for the string 'GET / HTTP.*Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1'. Every | starts a new command, and it looks like they are filtering and sorting the results. Tail just shows the last 10 lines of the output, to prevent screen scrolling, or to show the most recent data. Couldn't tell you what exactly the first column means. Try tail last10m and maybe you can figure it out looking at the full entries rather than the filtered output.

grep searching the file last10m (a website request log from the looks of it) for the string 'GET / HTTP.*Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1'. Every | starts a new command, and it looks like they are filtering and sorting the results. Tail just shows the last 10 lines of the output, to prevent screen scrolling, or to show the most recent data. Couldn't tell you what exactly the first column means. Try tail last10m and maybe you can figure it out looking at the full entries rather than the filtered output.

Brian

Code:

sort -n |uniq -c|sort -n

This gives it away; sort numeric; count the number of unique occurrences
of each IP, and sort that numerically in ascending order. In other words:

The whole thing tells you the top 10 IPs visiting your site, and just how
often they did visit, w/ the most frequent one at the bottom.

Cheers,
Tink

P.S.: Please, OP, pretty please; do not "top post" - it's a nasty habit
in e-Mail, and it's even uglier here because it adds no value whatsoever.

Personally I always learn best by example, followed by
(or accompanied with) an explanation. So, in the case
above, just use the grep by itself initially, and compare
that to the actual files content. Read "man grep".