From owner-freebsd-questions@FreeBSD.ORG Mon Jun 30 06:42:18 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 621F7CD3 for ; Mon, 30 Jun 2014 06:42:18 +0000 (UTC) Received: from p3plsmtpa08-09.prod.phx3.secureserver.net (p3plsmtpa08-09.prod.phx3.secureserver.net [173.201.193.110]) by mx1.freebsd.org (Postfix) with ESMTP id 1C433238F for ; Mon, 30 Jun 2014 06:42:17 +0000 (UTC) Received: from ethic.thought.org ([209.180.213.209]) by p3plsmtpa08-09.prod.phx3.secureserver.net with id LWgf1o00A4XeM0101WgfZU; Sun, 29 Jun 2014 23:40:40 -0700 Date: Sun, 29 Jun 2014 23:40:44 -0700 From: Gary Kline To: Olivier Nicole Subject: Re: long string using find and "-exec ls -ls" to find part-of filename Message-ID: <20140630064044.GA25085@ethic.thought.org> References: <20140630045605.GA11147@ethic.thought.org> <53B0EFF2.80205@calorieking.com> <20140630053004.GB16901@ethic.thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 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 06:42:18 -0000 ===== Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 27++ years of service to the Unix community. On Mon, Jun 30, 2014 at 01:03:59PM +0700, Olivier Nicole wrote: > Gary, > > On Mon, Jun 30, 2014 at 12:30 PM, Gary Kline wrote: > > ===== > > Organization: Thought Unlimited. Public service Unix since 1986. > > Of_Interest: With 27++ years of service to the Unix community. > > > > On Mon, Jun 30, 2014 at 12:09:04PM +0700, Olivier Nicole wrote: > >> > find . -name foo.tar -o -name foo.tgz -o -name foo.tar.gz|xargs ls -lsi > >> > >> With parenthesis: > >> > >> find . \( -name foo.tar -o -name foo.tgz -o -name foo.tar.gz \) |xargs ls -lsi > >> > >> Olivier > >> > >> > > > > > right! but 4 more keystrokes. :_) > > And 33 keystrokes to complain for the extra 4s! And I did not count > the line break and click on "send" :) > > Olivier > > > gary well or Alas, I wrote three more paragraphs but hit an extra key and sent it. BOING. Reason my try failed was that I was searching for "foo" instead of "vbc.tar/vbc.tgz/vbc.tar.gz. if I have a foo.c|tar|tgz it is junked. ANYWAY, the thing learned tonight is that it's *XARGS* instead of -exec abcfubarCmd. bedtime here. thanks you guys! I's gonna put this stuff in a sh script so I never have to waste ttwo++ hours. gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Twenty-seven years of service to the Unix community.