From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26326 invoked from network); 29 Mar 2004 16:28:40 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Mar 2004 16:28:40 -0000 Received: (qmail 18341 invoked by alias); 29 Mar 2004 16:28:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7296 Received: (qmail 18292 invoked from network); 29 Mar 2004 16:28:19 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 29 Mar 2004 16:28:19 -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 16:28:19 -0000 Received: (qmail 12877 invoked from network); 29 Mar 2004 16:28:19 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 29 Mar 2004 16:28:15 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i2TGS9Z15989; Mon, 29 Mar 2004 18:28:09 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1B7z8V-0001zt-00>; Mon, 29 Mar 2004 17:57:15 +0200 Date: Mon, 29 Mar 2004 17:57:15 +0200 From: DervishD To: Danek Duvall , Aaron Davies , zsh-users@sunsite.dk Subject: Re: Globbing for Empty Directories? Message-ID: <20040329155715.GD7450@DervishD> Mail-Followup-To: Danek Duvall , Aaron Davies , zsh-users@sunsite.dk References: <20040328194921.GA6311@DervishD> <20040329132800.GA7384@DervishD> <20040329151920.GA6379@lorien.emufarm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040329151920.GA6379@lorien.emufarm.org> User-Agent: Mutt/1.4.2.1i Organization: Pleyades X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi Danek :) * Danek Duvall dixit: > > > Adding any subdirectories or files to it seems to increase the > > > number of links it has. > > Not under Linux, at least, although it may depend on the > > filesystem type. For ext3, only subdirs increase the number of links > > of a directory. > As it should be. Think of it this way. st_nlink is the number of names > a filesystem object has on a filesystem. I'm with you, it's quite logical, but unfortunately people tends to think that, since a filename is 'linked' to its container directory, that should affect st_nlink (which is not true, this can be seen even in the GNU libc documentation). I was not sure if the standard (POSIX or SuS) specified the opposite. Summarizing: Zsh should follow 'find' example and implement tests for empty dirs investigating its contents, but since this can be easily done in, let's say, 'user space' (I mean, outside the shell, using shell commands), I see no need for it. I would like to have a globbing flag for empty dirs, because it is simpler, better integrated with the rest of globbin syntax and less error prone, so I vote for including it O:) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/