Last active
June 2, 2022 00:48
-
-
Save lchoate/b407eb137b5e13b46501d54dbcde07a5 to your computer and use it in GitHub Desktop.
Use wget to find bad links, 404's in html
This file contains hidden or 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
| Check Links | |
| wget --spider -r -nd -nv -H -l 1 -w 2 -o run1.log http://someserver.com | |
| Parse logfile for 404s | |
| grep -B1 'broken link!' run1.log | |
| Need to see where 404 referrers are? | |
| grep Wget /var/log/apache2/access.log | grep "HEAD /badlink1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment