From owner-freebsd-questions@FreeBSD.ORG Sat Feb 13 09:31:47 2010 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 4B49810657A5 for ; Sat, 13 Feb 2010 09:31:47 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 25B248FC13 for ; Sat, 13 Feb 2010 09:31:46 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id o1D9V3tK032629 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 13 Feb 2010 01:31:03 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id o1D9V373032628; Sat, 13 Feb 2010 01:31:03 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA15204; Sat, 13 Feb 10 01:27:27 PST Date: Sat, 13 Feb 2010 01:24:37 -0800 From: perryh@pluto.rain.com To: dougs@dawnsign.com Message-Id: <4b766fd5.VK3xWZMZCcYJJTF5%perryh@pluto.rain.com> References: In-Reply-To: User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: setting default directory ACLs using xargs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2010 09:31:47 -0000 Doug Sampson wrote: > I need to do this at the command prompt for all directories: ... > root@aries:/data/Products# getfacl . | setfacl -d -b -n -M - . > Now, I have thousands of subdirectories that I want to apply this > to. When I attempt to use the xarg command with the above command > modified to work with xargs, I end up with an error message ... Two possibilities come to mind: * Try using the "-L 1" switch to cause xargs to run a separate command instance for each input value. * You may have run into one of the rare situations where "find ... | xargs" is not the best tool for the job. It may work better to set up a 3-line shell script along the lines of #!/bin/sh cd $1 getfacl . | setfacl -d -b -n -M - . and then use "find -type d -exec" to run it for each directory.