[ale] chmod question
Dow Hurst
dhurst at kennesaw.edu
Mon Jun 7 14:42:05 EDT 2004
Okay, that makes sense! The example in the IRIX find manpage had the -o
operator so also had the escaped parentheses as well. I thought it was always
necessary when using the -exec. Now I understand what is really going on. :-)
Thanks a bunch!
Dow
PS. My IRIX sysadmin class instructor said to remember that "find" and "man
-k" are your friends. Never forgot that!
Fletch wrote:
>>>>>>"Dow" == Dow Hurst <dhurst at kennesaw.edu> writes:
>
>
> Dow> How come you don't have to do this: find . \( -type f \)
> Dow> -exec chmod 666 {} \;
>
> Parens would be necessary to group conditions; they don't have
> anything to do with subshells (in fact that's why they've got to be
> backwhacked so the shell doesn't try and interpret them as such).
> Multiple find predicates are treated as if they were joined with an
> implicit -a (Boolean and operator) between them. So when you say:
>
> find . -name foo -print
>
>
> That's really:
>
> find . -name foo -a -print
>
>
> If you wanted to get fancy and do things like "directories, or files
> named fred" you'd say:
>
> find . \( -type d -o -name fred \) -print
>
>
> Or more explicitly:
>
> find . \( -type -d -o -name fred \) -a -print
>
>
> The perl find2perl utility can be helpful translating a hairy find
> command line into something (possibly :) more intelligible.
>
>
--
__________________________________________________________
Dow Hurst Office: 770-499-3428 *
Systems Support Specialist Fax: 770-423-6744 *
1000 Chastain Rd. Bldg. 12 *
Chemistry Department SC428 Email: dhurst at kennesaw.edu *
Kennesaw State University Dow.Hurst at mindspring.com *
Kennesaw, GA 30144 *
************************************************************
This message (including any attachments) contains *
confidential information intended for a specific individual*
and purpose, and is protected by law. If you are not the *
intended recipient, you should delete this message and are *
hereby notified that any disclosure, copying, distribution *
of this message, or the taking of any action based on it, *
is strictly prohibited. *
************************************************************
More information about the Ale
mailing list