I'm trying to do a recursive find/grep from a directory on my linux box. Normally, I can do this no problem. This time, however, there are spaces in some directory names. I didn't create these dirs, and I don't really have control over them -- they're for another project that I'm not working directly on, but need to grep the source code.
So, my command looks something like:
find . -type f -print | grep -v -e stuff_i_dont_want | xargs grep -l what_im_looking_for
I use tcsh, but can switch to another shell if it will get me what I'm looking for.
Since there are spaces in some directory names, I get a ton of spam that looks like this:
grep: ./part/of/path: No such file or directory
grep: rest/of/path/file.txt: No such file or directory
So, in essence, the file it's trying to grep is:
"./part/of/path rest/of/path/file.txt"
Grep thinks that is two different files, and then it can't find either one when it splits on the space.
Thunks?