Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jun 2014 13:48:01 +0800
From:      Gregory Orange <gregory.orange@calorieking.com>
To:        Gary Kline <kline@thought.org>
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:  <53B0FA11.8020808@calorieking.com>
In-Reply-To: <20140630052410.GA16901@ethic.thought.org>
References:  <20140630045605.GA11147@ethic.thought.org> <53B0EFF2.80205@calorieking.com> <20140630052410.GA16901@ethic.thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30/06/14 13:24, Gary Kline wrote:
> On Mon, Jun 30, 2014 at 01:04:50PM +0800, Gregory Orange wrote:
>> How about this?
>> find . -name foo.tar -o -name foo.tgz -o -name foo.tar.gz|xargs ls -lsi
> 	yup.  then WHY O WHY O WHY doesnt this work::
> 	find . -name "foo.t*" |xargs ls -lsi
> 	work?  is it only my memory [[delusional] that made me think that
> 	"foo.t*" expanded into your cmd string??  I thought the "*"
> 	expanded into what you have to save the hacker typing/keystrokes.

Curiously your command line works for me on both an Ubuntu (sh, bash) 
machine and a FreeBSD (sh, bash, csh, tcsh) machine. I would have 
expected the shell to expand * to and cause find to return an error, but 
it appears not. Perhaps it depends on the shell? It works for me on the 
shells listed above.



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