From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8375 invoked by alias); 25 Jan 2014 18:26:57 -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: 18367 Received: (qmail 4135 invoked from network); 25 Jan 2014 18:26:52 -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: <140125102641.ZM21717@torch.brasslantern.com> Date: Sat, 25 Jan 2014 10:26:41 -0800 In-reply-to: <20140125055411.GA3794@solfire> Comments: In reply to meino.cramer@gmx.de ""ls" output like find ... -print0 anyhow ???" (Jan 25, 6:54am) References: <20140125055411.GA3794@solfire> 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 25, 6:54am, meino.cramer@gmx.de wrote: } } is there a way to temporary convince 'ls' to act that way, that I can } use '| xargs -0' with it? My first reaction to this is to think you're probably asking the wrong question. If you need to use -print0 then you're anticipating that the file names contain "dangerous" characters, but "ls" will already have processed the file names, so now you're concerned with what the output of "ls" looks like, which may have replaced some of those characters with "?" ... sounds like a recipe for problems. If using xargs -d $'\n' as Moritz suggested will not work, I suggest you try using the -ls option of "find". It can be combined with -print0 which may give you what you need. find foo ... -print0 -ls | xargs -0 ...