There are free, paid, and subscription-based tools to do this for you. The most popular being AHRefs for links. Others include Screaming Frog, SEMRush and Moz.