Last active
February 4, 2024 13:48
-
-
Save bmcguirk/f75caf04236096d843fc0206f01ec9f7 to your computer and use it in GitHub Desktop.
Find broken links (404s) via wget and grep.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Full credit to Pete here: http://www.createdbypete.com/articles/simple-way-to-find-broken-links-with-wget/ | |
wget --spider -nd -o ~/wget.log -e robots=off -w 1 -r http://www.example.com | |
grep -B 2 '404' example.com.log >> example.com.404.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment