On Mon Sep 25 14:09:54 2000 Winston Jenks wrote...
>
>Stan,
>    Here is two more cents from someone without an I/A system (yet).  Part 
>of the mystery of the find command is that its arguments are divided into 
>two groups {starting-directories} and {matching-criteria-and-actions}.  The 
>tricky thing is that the actions can be mixed with the criteria.  This 
>leads to the following somewhat obfuscated example taken from my Unix 
>System Admin book.  Note the escaped parentheses to group conditions (I 
>just found out you could do that!)
>
>find / \( -name a.out -o -name core \) -type f -exec rm -f {} \; -o -fstype 
>nfs -prune
>
>FIND(find) A PLAIN FILE(-type f) WHOSE NAME IS EITHER a.out OR core (-name 
>a.out -o -name core) AND REMOVE IT (-exec rm -f {} \; )  OR (-o) IF THE 
>FILESYSTEM TYPE IS NFS (-fstype nfs) DONT BOTHER SEARCHING (-prune).
>
>The trick is that the -prune is only applied to the part of the expression 
>after the top level OR.  In R. Swapp's earlier reply, the -prune needs to 
>be placed just where he has it, so that it only applies to the urfs 
>filesystem type.  I have a feeling that the earlier response you got from 
>Foxboro support is missing the -prune.  The book also describes another 
>System V action, -mount, to restrict the search to the filesystem of the 
>starting directory.  This option is -xdev on BSD systems.
>
>I cannot check any of this on an I/A system, so I suppose it is therefore 
>all theoretical.
>Winston Jenks
>Technical Director, Cape Software, Inc.
>

        Thaks, I had the mistaken impression that you had to put all the conditions
        _before_ the actions. I will have to think about how to best apply this to my
        problem.


-- 
Stan Brown     [EMAIL PROTECTED]                                    843-745-3154
Charleston SC.
-- 
Windows 98: n.
        useless extension to a minor patch release for 32-bit extensions and
        a graphical shell for a 16-bit patch to an 8-bit operating system
        originally coded for a 4-bit microprocessor, written by a 2-bit 
        company that can't stand for 1 bit of competition.
-
(c) 2000 Stan Brown.  Redistribution via the Microsoft Network is prohibited.

-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All 
postings from this list are the work of list subscribers and no warranty 
is made or implied as to the accuracy of any information disseminated 
through this medium. By subscribing to this list you agree to hold the 
list sponsor(s) blameless for any and all mishaps which might occur due to 
your application of information received from this mailing list.

To be removed from this list, send mail to 
[EMAIL PROTECTED] 
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]

Reply via email to