On January 11, 2004 07:38 pm, Jack Wang wrote: > I can use the following grep command to find a string > in current directory: > > grep "abc" *.* > > How to find a string recursively into subdirectories? > > Thanks. > > Jack > Hi, You can use it in conjunction with 'find". Allow 'find' to get the recursive file list and use finds 'exec' ooption. find /some/dir -exec grep "some_string" {} \; > some_results_file To find all the regular files containing "test", case insensitive, in the current directory and below, use: find . -type f -exec grep -i "*test*" {} \; >/tmp/test_results -- Pete Nesbitt, rhce -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list