I am trying to locate a file that (should) contains the string "1896.345", somewhere under /home/dir/.
Any ideas of how I can do it? Thanks
I am trying to locate a file that (should) contains the string "1896.345", somewhere under /home/dir/.
Any ideas of how I can do it? Thanks
cd home/dir
grep -r -l -i "1896\.345" .
grep -rl
would do.
– Thor
Sep 11 '12 at 14:01
Use find
and xargs
:
find /home/dir -type f -print0 | xargs -0 grep -l 1896.345
grep -r pattern .
will do.
– Thor
Sep 11 '12 at 13:59