Liam Delahunty: Home Tips Web Contact
Recommended laptop
under £500
.

Think I deserve a present? See my Amazon Wish List

Log File Analysis Getting inbound links

It's useful to get a list of the links you find coming into your sites so you can monitor them within the search engines and can deal with excessive hotlinking before it becomes a problem.

I'll use the following (as a single line command) to generate a list of links that I can easily follow and see the context of my link.


grep '"http' /path/to/web.log | 
grep -v '"http://www.domain.tld' |  
awk '{print $7,$11}' | 
sed 's/\(.*\) \(.*\)/<a href=\2>\1<\/a>/' | 
sort | uniq

Share this!  



Linux Ls Awk Totals | Linux Parsing Log File For Links | Linux Remove Duplicate Lines With Uniq


 

  Tips | Home | Search | Contact

Link here: