Gentoo Archives: gentoo-user

From: Roman Zilka <zilka@×××××××.cz>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Search filesystem with a wildcard
Date: Sat, 26 Feb 2011 11:04:34
Message-Id: 20110226112422.36631fea.zilka@fi.muni.cz
In Reply to: Re: [gentoo-user] Search filesystem with a wildcard by Amankwah
1 Amankwah (Sat, 26 Feb 2011 11:19:22 +0800):
2 > On Fri, Feb 25, 2011 at 06:26:51PM -0800, Grant wrote:
3 > > I used to use slocate like this to search the filesystem for a file:
4 > >
5 > > foo*.txt
6 > >
7 > > but mlocate doesn't seem to accept wildcards. I tried to figure out
8 > > how to do it with find but failed. Can anyone point me in the right
9 > > direction?
10 > >
11 > > - Grant
12 >
13 > How about this?
14 >
15 > find -name foo*.txt ?
16
17 +1 to this solution. Only, it may destroy the universe on some rare
18 occasions. A safer way:
19
20 find / -type f -name 'foo*.txt'
21
22 -rz