Thursday, June 7, 2007

Linux: Find in Files

Use Linux terminal to search for a string in files.

Command:
// Search the files in the current directory:
#grep "string to search" *

// Ignore case:

#grep -i "string to search" *

// Include sub-directories:
#grep -r "string to search" *

No comments: