From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PtPWc-00041S-L7 for garchives@archives.gentoo.org; Sat, 26 Feb 2011 19:09:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3BB581C0C1 for ; Sat, 26 Feb 2011 19:09:54 +0000 (UTC) Received: from smtp.tecnet.com.uy (smtp.tecnet.com.uy [200.40.123.43]) by pigeon.gentoo.org (Postfix) with ESMTP id 885D11C005 for ; Sat, 26 Feb 2011 18:26:21 +0000 (UTC) Received: from acme7.acmenet (r190-134-16-126.dialup.adsl.anteldata.net.uy [190.134.16.126]) by smtp.tecnet.com.uy (8.13.7/8.13.7) with ESMTP id p1QIQ66Y016332 for ; Sat, 26 Feb 2011 16:26:09 -0200 (envelope-from ljc@internet.com.uy) X-TN_STAT: 4137 Date: Sat, 26 Feb 2011 16:26:15 -0200 From: luis jure To: gentoo-user Subject: Re: [gentoo-user] Search filesystem with a wildcard Message-ID: <20110226162615.3c292534@acme7.acmenet> In-Reply-To: References: <20110226031922.GA11390@Diamond.KWGR614> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0b1 (smtp.tecnet.com.uy [200.40.123.43]); Sat, 26 Feb 2011 16:26:09 -0200 (UYST) X-Archives-Salt: X-Archives-Hash: cbf73eda1776aa77ebcfd2d7f40a9ed6 on 2011-02-26 at 09:33 Grant wrote: >I can't get find to work. This works: > >locate *foo*.txt > >but none of these work: > >find /my/folder -name foo*.txt >find /my/folder -name *foo*.txt >find /my/folder -type f -name '*foo*.txt' > >What am I doing wrong? I do need the find to be recursive in that folder. i'm sorry i haven't been following the thread too closely, but the last one should work. according to man find, when using wildcards in a search, "you should enclose the pattern in quotes or escape the wildcard", meaning that all these work: find /my/folder -type f -name "*foo*.txt" find /my/folder -type f -name '*foo*.txt' find /my/folder -type f -name \*foo\*.txt they certainly work for me. am i missing something?