Easy, man (or should I say "sachte"
?). Look at the time of my post then you understand what I meant. Anyway, what
Code:
grep -inHr -e 'find_anything' .
gives you? I suppose it's not
grep's fault. Something in the output of
find makes
grep think it's an option, and not a file name. I think that you have a file somewhere in your home directory named, say
Grönemeyer -Ö.mp3, i.e. having a space-dash sequence in its name. Try
Code:
grep -inH -e 'find_anything' -- `find . type f`
To find the "offending" file, try
By the way, invoking
find from
grep's command line as you did can give weird results if you have some files with unusual characters in their names. Better use either
Code:
find some/dir -type f -print0 | xargs -0 grep -inHe 'find_anything' --
or
Code:
find some/dir -type f -exec grep -inHe 'find_anything' -- {} \+
Alternatively, you can invoke
grep with the -r option as I did above. It's a GNU extension.
Bookmarks