On Thu, Apr 9, 2009 at 8:01 AM, Jay Hall <jh...@socket.net> wrote:
> When using the find command with the -exec option, does the find command
> wait for the command being executed to finish before returning the next
> result?
>
> For example, if I am using find -exec {} to copy files to tape, will find
> wait for the command to write the file to tape complete before it returns
> the next result?

It has to wait. It's easily verified by creating a simple script:

#!/bin/sh

echo "My args were: $*"
sleep 1

Then:

find /some/path -exec /path/to/f.sh {} \;

You'll see:

My args were: /some/path/a
(1 second delay)
My args were: /some/path/b
(1 second delay)
...

Regards,
Josh
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to