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 1PtmN7-0002OZ-In for garchives@archives.gentoo.org; Sun, 27 Feb 2011 19:33:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA8BF1C012; Sun, 27 Feb 2011 19:32:16 +0000 (UTC) Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com [209.85.220.181]) by pigeon.gentoo.org (Postfix) with ESMTP id BAE3F1C012 for ; Sun, 27 Feb 2011 19:32:16 +0000 (UTC) Received: by vxb39 with SMTP id 39so3630799vxb.40 for ; Sun, 27 Feb 2011 11:32:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=ABR/4y6wAkHHcQaEoXmTiwltN//4BuDZS4JufjSJ+sc=; b=Ul7rHcXwIRAJgMvSeUpTUdgeGAPvX6jFuWswoieVJpYy/hDrPqn+MijpTR33o8/Mpj I/YWURYOiGq932GNe2Bi/1sKZkL/KSlK/A7BG9PcCx8lHRQK7H+TDUVBJVRbtFXvrOBd Jxjj9gZ0AR7flF3cZu6MdW+6zduKA30vBxLOc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=xgBRYLF5yjMxBCqOkqV3BwW45V1HqH8mAZBCW8Q3JVWg+Uy6qnuNUIZ1IUhr+sDCkN 4fR6JMcXNcEUEJIAElCnUkmBT7DxQCNCutXeqUTYXX7gjBt7r8djK3DnazigozcDwOSz /BqchQcUVHsb2bh+94ij4cdlkQU4FmRthOd+E= 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 Received: by 10.220.193.139 with SMTP id du11mr1086454vcb.241.1298835135886; Sun, 27 Feb 2011 11:32:15 -0800 (PST) Received: by 10.220.71.140 with HTTP; Sun, 27 Feb 2011 11:32:15 -0800 (PST) In-Reply-To: References: <20110226031922.GA11390@Diamond.KWGR614> Date: Sun, 27 Feb 2011 11:32:15 -0800 Message-ID: Subject: Re: [gentoo-user] Search filesystem with a wildcard From: Grant To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 70db63536a958771e611e004ba28689a >> I can't get find to work. =A0This 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' > > $ mkdir -p =A0/my/folder > mkdir: cannot create directory `/my': Permission denied > $ mkdir -p my/folder > $ touch my/folder/foo.txt > $ find my/folder -type f -name '*foo*.txt' > my/folder/foo.txt > $ find /my/folder -name foo*.txt > find: `/my/folder': No such file or directory > $ ^/^ > find my/folder -name foo*.txt > my/folder/foo.txt > $ > >> What am I doing wrong? =A0I do need the find to be recursive in that fol= der. > > IMO the first thing you're doing wrong is concealing from us what you're = actually doing. > > You're telling us that `find /my/folder -name foo*.txt` and two other ver= sions don't work, yet you're relying on us taking your word on it that they= don't. > > Prove it! > > You could have done exactly as I did above and create a folder called "my= /folder" and created a file called foo.txt and then copied and pasted from = the terminal to show us your actual commands. > > So we are only left to guess that the file you're looking for is NOT actu= ally called "foo.txt" and it's NOT actually in a folder called "/my/folder"= . So the problem could be that you're looking for a file with a capital let= ter in its name, and that you're =A0using "-name" instead of "-iname", or i= t could be that you're searching the wrong directory tree, or it could be a= bunch of other things. Permissions springs to mind. > Yes, if I had posted the real stuff you would have been able to tell me to use -wholename instead of -name to mimic mlocate functionality. > But you'd rather waste our time in trying to conceal what you're looking = for (I can only assume the file is called "Busty big sluts 3.avi") than hel= p us help you. > I don't lose track of my Busty big sluts 3 AVI thank you very much. - Grant > Stroller.