How to find “dead” symbolic links

Cleaning up dead links can be useful once in a while.

First, you need to find them…

Run the following command to list dead symlinks:

Tested on FreeBSD and Mac OS X, I expect it to work on any distribution.