Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I 've install w3c checklink utility to check my website for broken links. but i am really confused with its parameters. I just want to get number of broken link of my site.but i don't know how to run this utility.

would you help me?

Edited: I tried these commands:

$ checklink -s -b -D 2 http://mysite.com >site-report

$ checklink -b -D 2 http://mysite.com >site-report

but a long report is created and store in site-report file. i just want the number of broken links not what they are.

share|improve this question
1  
The gods of server fault help those who help themselves. What have you tried already, and in what way was it not to your needs? Show you've read something, and you'll get a better class of answer. –  womble Jul 24 '11 at 3:50

2 Answers 2

I don't believe that linkcheck has the ability to report only a count of broken links. It's not really something that is generally useful -- if you've got broken links, typically you'd like to know what they are so you can fix them.

share|improve this answer
    
you are right,but i need it evaluate my site between some other sites. –  hd01 Jul 24 '11 at 7:07

You could just post-process the output of checklink with grep, awk or perl or something similar to count the number of broken links. e.g:

checklink ... | grep "The link is broken" | wc -l
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.