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 1PtXus-0003WL-4y for garchives@archives.gentoo.org; Sun, 27 Feb 2011 04:07:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C1AE0E06EC for ; Sun, 27 Feb 2011 04:07:29 +0000 (UTC) Received: from smtpout.karoo.kcom.com (smtpout.karoo.kcom.com [212.50.160.34]) by pigeon.gentoo.org (Postfix) with ESMTP id 3540B1C01E for ; Sun, 27 Feb 2011 03:46:50 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.62,233,1297036800"; d="scan'208";a="485673732" Received: from 213-152-39-90.dsl.eclipse.net.uk (HELO compaq.stroller.uk.eu.org) ([213.152.39.90]) by smtpout.karoo.kcom.com with ESMTP; 27 Feb 2011 03:46:49 +0000 Received: from [192.168.1.104] (unknown [192.168.1.104]) by compaq.stroller.uk.eu.org (Postfix) with ESMTP id D4842A959A for ; Sun, 27 Feb 2011 03:46:48 +0000 (GMT) Content-Type: text/plain; charset=us-ascii 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 (Apple Message framework v1082) Subject: Re: [gentoo-user] Search filesystem with a wildcard From: Stroller In-Reply-To: Date: Sun, 27 Feb 2011 03:46:48 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20110226031922.GA11390@Diamond.KWGR614> To: gentoo-user@lists.gentoo.org X-Mailer: Apple Mail (2.1082) X-Archives-Salt: X-Archives-Hash: 81492fc4dea207e59f6408d570f5d67c On 26/2/2011, at 5:33pm, Grant wrote: > I can't get find to work. This works: >=20 > locate *foo*.txt >=20 > but none of these work: >=20 > find /my/folder -name foo*.txt > find /my/folder -name *foo*.txt > find /my/folder -type f -name '*foo*.txt' $ mkdir -p /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 $=20 > What am I doing wrong? I do need the find to be recursive in that = folder. 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 = versions 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 = actually 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 letter in its name, and that you're using "-name" = instead of "-iname", or it could be that you're searching the wrong = directory tree, or it could be a bunch of other things. Permissions = springs to mind. 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 = help us help you. Stroller.