In article <[EMAIL PROTECTED]>,
James Mohr  <[EMAIL PROTECTED]> wrote:
>You need to tell -exec which file to process. This is done with curly braces:
>
>find /mnt/c/ -name *.snm -exec ls {} \;
>
>However, without the -exec, your command will simply list the files anyway. I 
>am assuming that this is just an example, and you would want to do more than 
>just list the file name. You could exand this concept and use the curly 

Also, you should realize that for each file processed, there is the
overhead of fork()/exec() calls.

You would probably find something like:

find /mnt/c -name '*.snm' | xargs -r ls -l 

to be significantly faster.

If you expect that there will be any spaces involved, consider using
-print0/-0 in addition:

find /mnt/c -name '*.snm' -print0 | xargs -0 -r ls -l 

mrc
-- 
     Mike Castle      [EMAIL PROTECTED]      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to