From owner-freebsd-questions@FreeBSD.ORG Mon Jun 30 22:55:42 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B6A51E3 for ; Mon, 30 Jun 2014 22:55:42 +0000 (UTC) Received: from dnvrco-oedge-vip.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.228]) by mx1.freebsd.org (Postfix) with ESMTP id E3CE72F03 for ; Mon, 30 Jun 2014 22:55:41 +0000 (UTC) Received: from [204.210.114.114] ([204.210.114.114:26766] helo=localhost.hawaii.res.rr.com) by dnvrco-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id F4/7C-05311-BEAE1B35; Mon, 30 Jun 2014 22:55:40 +0000 Received: by localhost.hawaii.res.rr.com (Postfix, from userid 1000) id 5E5025D20; Mon, 30 Jun 2014 12:57:09 -1000 (HST) Date: Mon, 30 Jun 2014 12:57:09 -1000 From: parv To: Gary Kline Subject: Re: long string using find and "-exec ls -ls" to find part-of filename Message-ID: <20140630225709.GA1993@holstein.holy.cow> Mail-Followup-To: Gary Kline , Polytropon , FreeBSD Mailing List References: <20140630045605.GA11147@ethic.thought.org> <53B0EFF2.80205@calorieking.com> <20140630053004.GB16901@ethic.thought.org> <20140630064044.GA25085@ethic.thought.org> <20140630230316.44ec3257.freebsd@edvax.de> <20140630214506.GA1606@holstein.holy.cow> <20140630215534.GA28552@ethic.thought.org> <20140701003013.f068eb05.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140701003013.f068eb05.freebsd@edvax.de> X-RR-Connecting-IP: 107.14.64.142:25 X-Authority-Analysis: v=2.1 cv=d7V7yHTE c=1 sm=1 tr=0 a=lLOF/jpPrR0dcgWXP1EvZg==:117 a=lLOF/jpPrR0dcgWXP1EvZg==:17 a=ayC55rCoAAAA:8 a=nkFfKy3LMXsA:10 a=R5FhY6rjjCMA:10 a=kj9zAlcOel0A:10 a=Ymsr-CWnAAAA:8 a=HaA8_4fE7DVZs-XXOBMA:9 a=CjuIK1q_8ugA:10 a=jKRid43F7UoA:10 X-Cloudmark-Score: 0 Cc: Polytropon , FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 22:55:42 -0000 in message <20140701003013.f068eb05.freebsd@edvax.de>, wrote Polytropon thusly... > Sorry Polytropon, for I lost Gary's mail. > On Mon, 30 Jun 2014 14:55:34 -0700, Gary Kline wrote: > > how about whitespace? ls -lsi appears as two cmds, so would > > it work as you have with backtics? > > > > find ... | xargs -n 1 `ls -lsi` Do see find(1) manual page ... -print0 This primary always evaluates to true. It prints the pathname of the current file to standard output, followed by an ASCII NUL character (character code 0). ... and xargs(1) one ... -0 Change xargs to expect NUL (``\0'') characters as separators, instead of spaces and newlines. This is expected to be used in concert with the -print0 function in find(1). ... to form ... find ... -print0 | xargs -0 -n 1 ... - parv --