Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] locate can not find a file
Date: Wed, 15 Mar 2017 18:56:23
Message-Id: 20170315185551.1a28de34@digimed.co.uk
In Reply to: Re: [gentoo-user] locate can not find a file by thelma@sys-concept.com
1 On Wed, 15 Mar 2017 10:24:27 -0600, thelma@×××××××××××.com wrote:
2
3 > > The wildcard is being expanded by your shell, so the command you are
4 > > actually running is
5 > >
6 > > locate consent_extraction1.pdf
7 > >
8 > > If you want to pass the * to locate, you need to escape or quote it.
9 >
10 > locate consent_extraction\* - didn't find anything
11 > locate "consent_extraction*" - didn't find anything
12 >
13 > locate "*consent_extraction*" - found both files
14 > locate *consent_extraction* - found both files
15
16 Or you could simply use
17
18 locate consent_extraction
19
20 because a substring match is the default behaviour.
21
22
23 --
24 Neil Bothwick
25
26 Q-Tip: When an omnipotent alien gives you advice.