Liam Delahunty: Home Tips Web Contact
Recommended laptop
under £500
.

Think I deserve a present? See my Amazon Wish List

Linux - Find string in various files.

find . | xargs grep 'string'

This will look in the current directory at all files. If we searched for Outlook, we'd currently get:

grep: .: Is a directory
grep: ./layouts: Is a directory
./using_email.php:

Outlook shortcuts

grep: ./flash_text_under_mask_files: Is a directory grep: ./email_obfuscation_for_spambots: Is a directory

Obviously one could limit the find (or ls) to avoid the directories.

Share this!