From: Grant <emailgrant@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Search filesystem with a wildcard
Date: Sun, 27 Feb 2011 11:32:15 -0800 [thread overview]
Message-ID: <AANLkTi=u5X_g+Dca1cvCVqgZi4k7Cb1ONE6hjE1t63ui@mail.gmail.com> (raw)
In-Reply-To: <C7BA3227-4CF9-4525-99C7-1C31DA110744@stellar.eclipse.co.uk>
>> 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'
>
> $ 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
> $
>
>> 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.
>
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 help us help you.
>
I don't lose track of my Busty big sluts 3 AVI thank you very much.
- Grant
> Stroller.
next prev parent reply other threads:[~2011-02-27 19:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-26 2:26 [gentoo-user] Search filesystem with a wildcard Grant
2011-02-26 3:19 ` Amankwah
2011-02-26 4:33 ` Mike Gilbert
2011-02-26 10:24 ` Roman Zilka
2011-02-26 17:33 ` Grant
2011-02-26 18:26 ` luis jure
2011-02-26 21:45 ` Roman Zilka
2011-02-27 3:46 ` Stroller
[not found] ` <73cb39da-826b-4754-91f4-40e9656fe961@ZABRYSVISEXHUB2.af.didata.local>
2011-02-27 6:52 ` Stroller
2011-02-27 11:29 ` Willie Wong
2011-02-27 19:32 ` Grant [this message]
2011-02-26 3:23 ` Mike Gilbert
2011-02-26 17:16 ` Grant
2011-03-01 0:58 ` Grant
2011-03-01 2:11 ` Alex Schuster
2011-03-01 17:56 ` Grant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=u5X_g+Dca1cvCVqgZi4k7Cb1ONE6hjE1t63ui@mail.gmail.com' \
--to=emailgrant@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox