Welcome to WebmasterWorld Guest from 54.146.201.80

Forum Moderators: bakedjake

Message Too Old, No Replies

shell tips and tricks

     
5:40 am on Oct 22, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 17, 2000
posts:2924
votes: 0


If you either a) have a shell tip or a trick you'd like to share, or b) know of a good online resource for shell tips and tricks, please post away.
7:02 am on Oct 23, 2001 (gmt 0)

Administrator from US 

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 21, 1999
posts:38047
votes: 11


Best one I've seen: (almost a book):
[nl.ijs.si...]
5:42 pm on Oct 23, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
posts:904
votes: 0


My current favourite is doing quick and dirty log analysis using a combination of grep, pipes and wc - eg

grep -i googlebot access.log grep -i "23/oct" wc -l

to show how many times googlebot has been around today, or

grep -i google.com access.log grep -iv googlebot wc -l

for how many referrals from google... etc.

Not exactly deep, detailed data, but useful for a quick buzz through to see if anything warrants a closer look.

8:51 pm on Oct 30, 2001 (gmt 0)

New User

10+ Year Member

joined:Oct 16, 2001
posts:24
votes: 0


More quick and dirty log analysis: see what IP addresses are hitting the URL containing string the most:

awk '/string/ {print $1}' logfile  sort  uniq -c  sort -nr

I love awk, sort and uniq!

8:55 pm on Oct 30, 2001 (gmt 0)

New User

10+ Year Member

joined:Oct 16, 2001
posts:24
votes: 0


sugarkane: instead of doing this:

grep -i "23/oct"  wc -l

you can simplify it:

grep -ic "23/oct" 

since c is the option to grep for count.

1:35 am on Nov 8, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 17, 2000
posts:2924
votes: 0


Here's a basic one:
grep '200 - "http://' *.log ¦ grep -c '200 - "http://'

Its a quick and dirty total referrer check.
10:12 pm on Nov 8, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 17, 2000
posts:2924
votes: 0


I just realized that this exact grep would be useless to most of you, because it does not take into account local referrer. It works great for doorway domains though. ;)