--- layout: post title: Use Wget to Detect Dead Links category : Linux tags : [Linux, Utilities] --- Typical wget usage: wget -r --spider -b -o /var/tmp/wget.log http://target.site.com/ -r - Recursive download --spider - Check downloaded content for new links, then discard -b - Run in the background -o /var/tmp/wget.log - Target log file http://target.site.com/ - Replace with the site you want to check wget will create a log file detailing the status codes reported while downloading content from the target site - note that this method will catch links to nonexistent content from within the domain, however, off-site links will not be checked (which is why it pays to monitor your site's error logs). ## Reference * [Wget下载中级用法和15个详细的例子](http://www.cnblogs.com/dzh-stuff/archive/2012/02/16/2354611.html)