I need to search for a particular string. This string might be present in many files. The directory in which I am present has more than one subdirectories. Hence, the search should check in all the subdirectories and all the corresponding files and give a list of files which have the particular string.How is this possible in unix?
-R, -r, --recursive
Read all files under each directory, recursively; this is equiv-
alent to the -d recurse option.
-l, --files-with-matches
Suppress normal output; instead print the name of each input
file from which output would normally have been printed. The
scanning will stop on the first match.
Apologise.....My session was getting hung when i tried running this cmd. Some problem with the server. Looks like its working fine. Just to add:
The command
find . -type f -exec grep -li 'accruals' {} \;
works in such a way that the case is also ignored.