Quote:
Originally Posted by dimeetrees
Would you guys recommend any resources on learning linux inside and out? Something that uses examples and explains all the concepts?
|
Just going back to the initial question: one way to
finding out what is going on really is to use the man-
page, and then disect the command line.
Code:
grep 'GET / HTTP.*Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1' last10m |cut -d ' ' -f1 |sort -n |uniq -c|sort -n|tail
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".
Then see what
Code:
grep 'GET / HTTP.*Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1' last10m |cut -d ' ' -f1
does, and read "man cut" to understand the options it was
invoked w/ and get a feel for what cut does.
Next, try the third one tacked on:
Code:
grep 'GET / HTTP.*Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1' last10m |cut -d ' ' -f1 |sort -n
read "man sort" alongside ... and so forth. And as it
bears an actual relation to what you're doing (need to
do) it should stick fairly well.
Cheers,
Tink