From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3414 invoked from network); 29 Mar 2004 06:04:37 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Mar 2004 06:04:37 -0000 Received: (qmail 7459 invoked by alias); 29 Mar 2004 06:03:58 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7290 Received: (qmail 7428 invoked from network); 29 Mar 2004 06:03:57 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 29 Mar 2004 06:03:57 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 29 Mar 2004 6:3:56 -0000 Received: (qmail 31722 invoked from network); 29 Mar 2004 06:03:56 -0000 Received: from sccimhc02.asp.att.net (63.240.76.164) by a.mx.sunsite.dk with SMTP; 29 Mar 2004 06:03:53 -0000 Received: from louisville.edu (12-220-223-80.client.insightbb.com[12.220.223.80]) by sccimhc02.asp.att.net (sccimhc02) with SMTP id <20040329060325im200rp45te>; Mon, 29 Mar 2004 06:03:25 +0000 Date: Mon, 29 Mar 2004 01:03:25 -0500 Subject: Re: Globbing for Empty Directories? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) Cc: Aaron Davies , zsh-users@sunsite.dk To: DervishD From: Aaron Davies In-Reply-To: <20040328194921.GA6311@DervishD> Message-Id: Content-Transfer-Encoding: 7bit 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 Sunday, March 28, 2004, at 02:49 PM, DervishD wrote: > Hi Aaron :) > > * Aaron Davies dixit: > >> Is there a way to get empty directories from a glob pattern? '*(L0)' >> finds empty files, but doesn't work for dirs. I'm looking for >> something >> the equivalent of find's -empty argument, since I hate find with a >> passion and would love to never use it again. > > There is not, AFAIK. See the mailing list archives, I asked more > or less the same a few months ago. Testing for the number of links > won't work for directories :(( Actually, I'm not sure of that. According to the info page for find, a directory will always have two hard links, itself and it's "." pointer. Adding any subdirectories or files to it seems to increase the number of links it has. So wouldn't *(/l2) find empty directories? Or is this hard-link policy not true on all systems? -- __ __ / ) / ) /--/ __. __ ________ / / __. , __o _ _ / (_(_/|_/ (_(_) / / <_ /__/_(_/|_\/ <__