From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15038 invoked by alias); 27 Jan 2014 04:20:38 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18373 Received: (qmail 3580 invoked from network); 27 Jan 2014 04:20:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140126202020.ZM19008@torch.brasslantern.com> Date: Sun, 26 Jan 2014 20:20:20 -0800 In-reply-to: <20140127015951.GA56068@redoubt.spodhuis.org> Comments: In reply to Phil Pennock "Re: "ls" output like find ... -print0 anyhow ???" (Jan 26, 8:59pm) References: <20140125055411.GA3794@solfire> <20140127015951.GA56068@redoubt.spodhuis.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: "ls" output like find ... -print0 anyhow ??? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 26, 8:59pm, Phil Pennock wrote: } } I'd use the print builtin of zsh, so that there are no argv length } limitations, combined with zsh's very powerful glob operators. Meino mentioned in private email that he has particular reasons for using "ls" instead of "find". If the options of "ls" are important (rather than just the file names) and you don't need to worry too much about CPU consumption: print -N -- **/*(.e:'reply=("$(ls -l "$REPLY")")':) | xargs -0 ... That's going to run "ls -l" once for each plain file (.) below the current directory, so it's a lot more process-intensive than a single "ls -lR", and it may not sort in the order you expect, but it will give you "ls" output with $'\0'-terminated lines.