On Sat, Aug 15, 2009 at 9:34 AM, David T. Lewis <lewis@mail.msen.com> wrote:

On Fri, Aug 14, 2009 at 11:38:22AM -0600, David Farber wrote:
>
> Spaces in file names are natural to Mac users (I'm a Mac user) but,
> in my opinion, they are best left to the "casual users" and the GUI
> side of the OS.  If I'm working with documents in the regular GUI
> apps (Text Edit, Word, the Finder, etc) I will use spaces in file names.
>
> But if I am on the "unix" side of the OS (using Terminal, using
> emacs, using unix tools, doing development, etc) I do not use spaces
> in file names.
>
> My preference would be to remove spaces from the file names in the
> Mac OS subtree.

If you are working from a Terminal, try something like this to scan
for all C source and header files that contain the string 'foobar':

$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar {} \;

If there are spaces in the filename then you need to put quotes around the file name expansion, i.e.

$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar "{}" \;
 

Dave