[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] chown options
- Subject: [ale] chown options
- From: esoteric at 3times25.net (Geoffrey)
- Date: Wed Jan 19 14:02:13 2005
- In-reply-to: <044e01c4fe42$383376d0$6603a8c0@win2kpro1>
- References: <043501c4fe3e$5bfb9ba0$6603a8c0@win2kpro1> <[email protected]> <044e01c4fe42$383376d0$6603a8c0@win2kpro1>
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