How to find broken links on a website
For Chrome Extension there is hexometer
See LinkChecker for Firefox.
For Mac OS there is a tool Integrity which can check URLs for broken links.
For Windows there is Xenu's Link Sleuth.
Just found a wget script that does what you are asking for.
wget --spider -o wget.log -e robots=off --wait 1 -r -p http://www.example.com
Credit for this goes to this page.