From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23144 invoked from network); 5 Aug 2005 12:58:25 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Aug 2005 12:58:25 -0000 Received: (qmail 39134 invoked from network); 5 Aug 2005 12:58:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Aug 2005 12:58:17 -0000 Received: (qmail 8953 invoked by alias); 5 Aug 2005 12:58:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9244 Received: (qmail 8939 invoked from network); 5 Aug 2005 12:58:09 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Aug 2005 12:58:09 -0000 Received: (qmail 37989 invoked from network); 5 Aug 2005 12:58:09 -0000 Received: from viefep11-int.chello.at (213.46.255.27) by a.mx.sunsite.dk with SMTP; 5 Aug 2005 12:58:05 -0000 Received: from Dingo ([213.47.104.218]) by viefep11-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050805125804.IREB2678.viefep11-int.chello.at@Dingo> for ; Fri, 5 Aug 2005 14:58:04 +0200 From: Christian Taylor To: "zsh-users" Subject: Re: Sorting files Date: Fri, 5 Aug 2005 14:57:18 +0200 User-Agent: KMail/1.8 References: <20050804.203836.63133092.Meino.Cramer@gmx.de> <200508042151.33462.cht@chello.at> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200508051457.18672.cht@chello.at> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.4 zzapper wrote: > >Meino Christian Cramer wrote: > >> I played around with combinations including expressions like > >> **/*(.,oL) trying to get a listing of all files found !including > >> those of the subdirectories! sorted by their size. I want one big > >> listing sorted "once" -- but I got "seperated" parts sorted each for > >> themselves. > > Any chance of a summary of this interesting thread (assuming it's > finished)? I don't know if the thread is finished yet, but I'll try to sum up the things I've learned so far. I'm no zsh expert, so pointing out errors would be much appreciated: According to the user guide and the actual behaviour of zsh (4.2.5) on my system, this should do exactly what Meino wants, sorting all files by size "in one go" (files from different subdirectories mixed together): print -l -- **/*(.oL) However, Meino replied to a similar suggestion "This gave me no sorted output...sorry :O)" - unfortunately, I have no idea why this is so. "print -l -- **/*(.,oL)" also sorts in one go, but unintentionally includes EVERYTHING, because no glob qualifier other than sorting is given after the comma ("match everything that is a regular file or anything at all"). The "od" sort option that was suggested puts files in subdirectories before those in the current directory at each level of the search. "Od" does the reverse. The results of "**/*(.odoL)" seem a bit unexpected at first, because files of all subdirectories are mixed together, but still all files of every subdirectory appear before files in the respective parent directory, and the whole list is sorted by size as far as this constraint allows. "**/*(.odL)" doesn't work - zsh interprets the L as the regular size glob qualifier with a missing size specification, because every sort qualifier has to be directly preceded by "o" or "O". However, if I understood Meino's goal correctly, he'll want neither "od" nor "Od" in his glob qualifier. That's about it, I hope this helps someone, Christian