[net.bugs.4bsd] Solution for find

wall@ucbvax.ARPA (Steve Wall) (10/06/84)

Apparently what I thought was a bug in find(1) was a syntax error
on my part in giving the command, although the error was pretty
obscure. find(1) **MUST** have a space between the "{}" and the
escaped ";" in order to work correctly. Some people suggested putting 
quotes around the {}, but that still doesn't work unless you have a 
space between the {} and the escaped ";".  This is ***NOT*** made clear 
on the manual page. Argh!

Here's a script with a few responses/suggestions and what they
produce:

===========================================
arpa % ls -RF
1/	2/

1:
file_find

2:
file_find

>	Try putting the {} in quotes so the shell doesn't expand it.

arpa % find . -name file_find -exec ls -l "{}"\;	-->[NOTE: NO SPACE!]
find: incomplete statement

>	don't combine the {} and the \; in the same token.
>
>		find ...... -exec ls -l {} \;
>
>	should do what you want.

arpa % find . -name file_find -exec ls -l {} \;  --->[NOTE: THE SPACE!]

-rw-r--r--  1 wall            0 Oct  4 06:46 ./1/file_find
-rw-r--r--  1 wall            0 Oct  4 06:46 ./2/file_find

=============================================
Thanks for the responses,

Steve Wall
wall@ucbarpa
..!ucbvax!wall