I'm searching for the way to find a file that contains specified string text.
It should be fast as possible but its not that important.
I was reading the manual, and I've build something like that: grep my_string * -r
and it works at all, but if there are many directories to search.
Are there any other ways to find a file that contains specified string in FreeBSD?
grep -r string dir1 dir2 dir3
, or just grep the string on the whole drivegrep -r string /
(this could take a long time though and i'm not sure if freebsd grep will dig into devices by default)-x
option will preventfind
from descending into directories with device numbers different from the starting point of the find, so devices will be skipped.