Subject: RE: how to exclude a directory from find?

From: Casper BodenCummins <[email-masked]>
Date: Thu, 12 Sep 1996 13:00:08 +0100

Lazaro Salem <[email-masked]> wrote:

>The -print flag is not really needed as is executed by default.

This isn't true of all systems. If you want portability, include the
-print.

>Certainly it would be nice to have something like:
> $ find . -type !d  
> to match files which are not directories, but I don't know if something 
> like that is possible for find. So if can take your question and rephrase 
> it: 
> 
> Is there any kind of "logical not" affecting a flag in find? 

Yes, ! is it. find uses shell-style evaluation, so for the above you
would say:

    find . ! -type d -print

Casper Boden-Cummins.

---

From: [email-masked] (Bill Roman)
Date: Thu, 12 Sep 1996 19:56:11 -0700 (PDT)

> This isn't true of all systems. If you want portability, include the

I believe that POSIX.2 mandates -print as the default.  Can someone who
has the spec confirm this?

-- 
Bill Roman  ([email-masked] / [email-masked])   running linux