Date: Sat, 13 Feb 2010 01:24:37 -0800 From: perryh@pluto.rain.com To: dougs@dawnsign.com Cc: freebsd-questions@freebsd.org Subject: Re: setting default directory ACLs using xargs Message-ID: <4b766fd5.VK3xWZMZCcYJJTF5%perryh@pluto.rain.com> In-Reply-To: <D05FCB8B5D9E904981802903D84EEFEF3DF3@hydra.dawnsign.com> References: <D05FCB8B5D9E904981802903D84EEFEF3DF3@hydra.dawnsign.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Doug Sampson <dougs@dawnsign.com> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4b766fd5.VK3xWZMZCcYJJTF5%perryh>
