Date: Thu, 9 Apr 2009 14:14:45 -0400 From: Josh Carroll <josh.carroll@gmail.com> To: Jay Hall <jhall@socket.net> Cc: freebsd-questions@freebsd.org Subject: Re: find command question Message-ID: <8cb6106e0904091114y73189738g3eea1d562bf3188@mail.gmail.com> In-Reply-To: <18E2669B-9EC4-4F63-8B1C-E7D81EBDD607@socket.net> References: <18E2669B-9EC4-4F63-8B1C-E7D81EBDD607@socket.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 9, 2009 at 8:01 AM, Jay Hall <jhall@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8cb6106e0904091114y73189738g3eea1d562bf3188>