From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7594 invoked from network); 31 Mar 2004 01:45:15 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 31 Mar 2004 01:45:15 -0000 Received: (qmail 19200 invoked by alias); 31 Mar 2004 01:44:58 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7304 Received: (qmail 19190 invoked from network); 31 Mar 2004 01:44:57 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 31 Mar 2004 01:44:57 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 31 Mar 2004 1:44:57 -0000 Received: (qmail 12978 invoked from network); 31 Mar 2004 01:44:57 -0000 Received: from sccmmhc02.asp.att.net (204.127.203.184) by a.mx.sunsite.dk with SMTP; 31 Mar 2004 01:44:55 -0000 Received: from louisville.edu (12-220-223-80.client.insightbb.com[12.220.223.80]) by sccmmhc02.asp.att.net (sccmmhc02) with SMTP id <20040331014428mm200j1kbte>; Wed, 31 Mar 2004 01:44:28 +0000 Date: Tue, 30 Mar 2004 20:44:26 -0500 Subject: Re: Globbing for Empty Directories? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) From: Aaron Davies To: zsh-users@sunsite.dk Content-Transfer-Encoding: 7bit In-Reply-To: <20040329232435.GA8304@DervishD> Message-Id: X-Mailer: Apple Mail (2.553) X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: *** X-Spam-Status: No, hits=3.4 required=6.0 tests=FROM_ENDS_IN_NUMS, MAILTO_TO_SPAM_ADDR,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 3.4 On Monday, March 29, 2004, at 06:24 PM, DervishD wrote: > Aaron Davies dixit: > >>> I have not tested in many systems, but Linux don't do it, and >>> I've not found any standard that require files to be links on the >>> directory. If you find any, please tell me to report the current >>> behaviour as a bug to Linux kernel developers, but looking at >>> findutils sources (that being GNU are intended to be very portable), >>> you can see the following: >> I'm on OS X, so it may be a peculiarity of HFS+. > > Do you mean you can know if a dir is empty or not in OS X looking > for the number of st_nlinks it has? I must confess I don't know a > workd about HFS+ O:) On cursory examination, it would appear so. I haven't done any serious testing (or looked at any docs), but the number of links listed in ls -l for a directory seems to equal the number of files in it plus two. -- __ __ / ) / ) /--/ __. __ ________ / / __. , __o _ _ / (_(_/|_/ (_(_) / / <_ /__/_(_/|_\/ <__