Aug 24
Let’s say you want to search for a string in all files in a directory. A good way of accomplishing this would be to use the following command:
$ find . -exec grep “_TYPE_STRING_HERE_” ‘{}’ \; -print
This will only find the string in the current directory. So if you want to search another directory, you would have to specify it in your command.
$ find . -ctime +1 -name “*.EXT” -print
This will find files (with the specified extension) that are older than 1 day. Alternatively you can use flags such as mtime (modified) and atime (accessed) as well.