From owner-freebsd-questions@FreeBSD.ORG Thu Apr 9 18:14:46 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5909510656C7 for ; Thu, 9 Apr 2009 18:14:46 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id 2CEB68FC17 for ; Thu, 9 Apr 2009 18:14:45 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so642836wfg.7 for ; Thu, 09 Apr 2009 11:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=TDuuTJFlBT+wwOEo9fdaLNtwGtJBaQ7Bvtf39hKMhtU=; b=Z/dwml5NXrFRhn6s2V3QogETTbd+eKQGt1HnTxSp1F7MkdNAXRQoR/TPGOwoYHIwdj WQFxgU4ETulc4ObCQq3pbrn6/Q6T1YzhXwuGQCxGuS6OPmROf3aTy9Y5hQ0WMTlLMycW EQ+faeuWuppIFn973wf9HBpQUFBgcnhKXE1js= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; b=h369HVAxPbGGu90hnkeSwknBSMq1z+DAgG0AaZRJ6OHzHa1E0Oieg9OhqlNhw7irPv Q1dsi1hwqG5Fg9CKGQf0H1W4mI3bd57tW69JKcElFV9OkFV5phYqYqW4qgP1VO6Rc1R4 hyHL+z/tJ9p3b/494GqYp+/GGjZEhpvCAcEuo= MIME-Version: 1.0 Received: by 10.142.230.11 with SMTP id c11mr946829wfh.246.1239300885686; Thu, 09 Apr 2009 11:14:45 -0700 (PDT) In-Reply-To: <18E2669B-9EC4-4F63-8B1C-E7D81EBDD607@socket.net> References: <18E2669B-9EC4-4F63-8B1C-E7D81EBDD607@socket.net> Date: Thu, 9 Apr 2009 14:14:45 -0400 Message-ID: <8cb6106e0904091114y73189738g3eea1d562bf3188@mail.gmail.com> From: Josh Carroll To: Jay Hall Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: find command question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2009 18:14:46 -0000 On Thu, Apr 9, 2009 at 8:01 AM, Jay Hall 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