[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: locate question



On 11/7/23 11:52, Markus Schönhaber wrote:
Am 07.11.23 um 17:32 schrieb gene heskett:

Greetings all;
I dunno if I've forgot how to use it, or it broken by the same bug that
killing me with the lagging access to my home raid10.

Fact: there are probably over 100 files in my /home/gene directory and
all its subs with assorted names ending in ".scad", made by OpenSCAD
Fact: I just ran "sudo updatedb" and generated a new date just now,
/var/cache/locate/locatedb.n
so that s/b uptodate.
Al of those files should be spit out by:
"locate *.scad" issued from an xfce terminal
but I get:
gene@coyote:~$ locate *.scad

Since you're not escaping the '*' you (i. e. the shell) implicitly did:

gene@coyote:~$ locate vac_ctrl_box.scad xhome_cable.scad

instead, try

gene@coyote:~$ locate .scad

/home/gene/vac_ctrl_box.scad
/home/gene/xhome_cable.scad

Acc an ls -R|wc -l  there are
433179
files in my /home/gene directory

so locate isn't working as I think it should.
try find but it finds the whole my whole local net:

No, it searches starting at ".scad" and ".". The former doesn't exist
and the latter is your home directory (because that is the $CWD when you
issued the command) which find recursively searches for everything,
since you didn't specify what to search for.

gene@coyote:~$ find .scad .  |wc -l
find: ‘.scad’: No such file or directory
1176532

What am I doing wrong?

Try

gene@coyote:~$ find . -name '*.scad'

And that works, thanks all.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis


Reply to: