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_]+?@domain.co.uk' * | sort -u

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

Handy!


Tags: linuxgrepemailfind