Find text within files
Posted on May 1, 2008
Stuck trying to find text within files on Linux?
cd /directory_tree_you_want_to_search
find . -type f -exec grep -l "string to find" {} ; -print
Easy!
Related posts
- Fixing cPanel File Permissions
Sometimes users mess with their own file permissions that they no longer work. They will... - Using SCP to copy files between Linux servers
SCP? SCP is a method of securely transferring files between a local and a remote... - Truncate a string to the nearest word
Truncating a string in PHP is easy, substr($start,$finish), but its annoying when it truncates the... - Yellow text?
I stumbled over a strange bug on two systems the other day where the imagettftext()... - FuzzyOCR for SpamAssassin on Ubuntu
FuzzyOCR is a plugin for SpamAssassin that analyzes the content and properties of images to...



May 4th, 2008 - 21:06
grep -lir ‘some text’ *
May 4th, 2008 - 21:09
Almost as good, but I found it freaked out with symbolic links occasionally.