From owner-freebsd-questions@FreeBSD.ORG Mon Jun 30 05:48:15 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 CD65A9C2 for ; Mon, 30 Jun 2014 05:48:15 +0000 (UTC) Received: from pandora.au.calorieking.net (114.179.70.115.static.exetel.com.au [115.70.179.114]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72F1F2EE4 for ; Mon, 30 Jun 2014 05:48:15 +0000 (UTC) Received: from pandora.internal (localhost [127.0.0.1]) by pandora.au.calorieking.net (Postfix) with ESMTP id E945033CDD; Mon, 30 Jun 2014 13:48:12 +0800 (WST) X-Virus-Scanned: amavisd-new at calorieking.com Received: from pandora.au.calorieking.net ([127.0.0.1]) by pandora.internal (pandora.internal [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dJRxUlJUFZcH; Mon, 30 Jun 2014 13:48:02 +0800 (WST) Received: from egeria.internal (egeria.internal [192.168.2.111]) by pandora.au.calorieking.net (Postfix) with ESMTPSA id 350B333CDC; Mon, 30 Jun 2014 13:48:02 +0800 (WST) Message-ID: <53B0FA11.8020808@calorieking.com> Date: Mon, 30 Jun 2014 13:48:01 +0800 From: Gregory Orange User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Gary Kline Subject: Re: long string using find and "-exec ls -ls" to find part-of filename References: <20140630045605.GA11147@ethic.thought.org> <53B0EFF2.80205@calorieking.com> <20140630052410.GA16901@ethic.thought.org> In-Reply-To: <20140630052410.GA16901@ethic.thought.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 05:48:15 -0000 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.