[ale] chown options

Geoffrey esoteric at 3times25.net
Wed Jan 19 14:02:13 EST 2005


Ryan Fish wrote:
> So (pardon the relative newbie here please), would I just add this to the
> line performing the recursive chown as in?:
> 
> chown -R UID.GID /a/b/c ; find .-print |grep /d/e |xargs -n 10 chown
> UID2:GID2
> 
> OR, would I need to place this on a separate line?

You wouldn't need anything other than what I posted.  Don't forget the 
'-v' option to grep, otherwise it will do exactly the opposite of what 
you expect.  The grep will be greedy as well.  For example

grep -v foo

Would exclude anything that contained foo.  If the directory you want to 
exlude is not unique to all files, but is to all directories then you 
could use a variation such as:

find . -type d -print|xargs grep -v $DIRECTORY_YOU_DONT_WANT |
	xargs -n 10 chown -R

-- 
Until later, Geoffrey



More information about the Ale mailing list