Gentoo Archives: gentoo-user

From: Mike Gilbert <floppymaster@×××××.com>
To: gentoo-user@l.g.o
Cc: Grant <emailgrant@×××××.com>
Subject: Re: [gentoo-user] Search filesystem with a wildcard
Date: Sat, 26 Feb 2011 04:08:00
Message-Id: AANLkTimPMGCG5e3ELE6=NSaj0E7cHMz9jxY6d2K8298_@mail.gmail.com
In Reply to: [gentoo-user] Search filesystem with a wildcard by Grant
1 On Fri, Feb 25, 2011 at 9:26 PM, Grant <emailgrant@×××××.com> wrote:
2 > I used to use slocate like this to search the filesystem for a file:
3 >
4 > foo*.txt
5 >
6 > but mlocate doesn't seem to accept wildcards.  I tried to figure out
7 > how to do it with find but failed.  Can anyone point me in the right
8 > direction?
9 >
10 > - Grant
11 >
12 >
13
14 Try locate "*/foo*.txt". mlocate seems to match based on the full path name.
15
16 Also, to quote the manpage:
17
18 If any PATTERN contains no globbing characters, locate behaves as if
19 the pattern were *PATTERN*.

Replies

Subject Author
Re: [gentoo-user] Search filesystem with a wildcard Grant <emailgrant@×××××.com>