in reply to Managing a directory with millions of files

Take a peek at ack. For example:

$> ack -ag file_name_regex some_directory
This will recursively find all files beneath some_directory/ where the full path =~ /file_name_regex/.