wget --spider -r -l 1 --header='User-Agent: Mozilla/19' -o broken_links.txt http://example.com/updates/Then I used grep to see whether 404 error was appearing in the output file.
grep -B 2 '404' broken_links.txt # -B 2 :Print 2 lines of leading context before matching lines which contains the broken link
No comments:
Post a Comment