Find All Email Addresses in a Folder (eg Codebase)

Here is a nice little one liner to search recursively in a directory and then pull out all email addresses that it finds

grep -shoPR '[a-zA-Z_]+?' * | sort -u

This will quickly find all email addresses and hten give you a sorted unique list


Tags: linuxgrepemailfind