Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2014 23:40:44 -0700
From:      Gary Kline <kline@thought.org>
To:        Olivier Nicole <olivier.nicole@cs.ait.ac.th>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: long string using find and "-exec ls -ls" to find part-of filename
Message-ID:  <20140630064044.GA25085@ethic.thought.org>
In-Reply-To: <CA%2Bg%2BBvh%2BDk0iYCjbGKVt59-nfDoCFQ6qmArrJu7ueaT7VzDi1g@mail.gmail.com>
References:  <20140630045605.GA11147@ethic.thought.org> <53B0EFF2.80205@calorieking.com> <CA%2Bg%2BBvg1=o71ObOpbh4ry-=unj2HOjjmcQHX1DOeAfwyhLu=QQ@mail.gmail.com> <20140630053004.GB16901@ethic.thought.org> <CA%2Bg%2BBvh%2BDk0iYCjbGKVt59-nfDoCFQ6qmArrJu7ueaT7VzDi1g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
=====
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 <kline@thought.org> 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* <cmd>
	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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140630064044.GA25085>