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
/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:
gene@coyote:~$ find .scad . |wc -l
find: ‘.scad’: No such file or directory
1176532
What am I doing wrong?
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
/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:
gene@coyote:~$ find .scad . |wc -l
find: ‘.scad’: No such file or directory
1176532
What am I doing wrong?
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
/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:
gene@coyote:~$ find .scad . |wc -l
find: ‘.scad’: No such file or directory
1176532
What am I doing wrong?
Greetings all;
gene@coyote:~$ locate *.scad
/home/gene/vac_ctrl_box.scad
/home/gene/xhome_cable.scad
On Tue, Nov 07, 2023 at 11:32:21AM -0500, gene heskett wrote:
gene@coyote:~$ locate *.scad
/home/gene/vac_ctrl_box.scad
/home/gene/xhome_cable.scad
Markus and The Wanderer were spot on.
As a reminder to all: this "naked" *.scad gets already expanded
by the shell (try "echo *.scad"), so what locate gets to see is
an already expanded list of all files ending in .scad in whatever
directory you happen to be, most probably:
locate vac_ctrl_box.scad xhome_cable.scad
... because these are most probably the only two files matching
that glob pattern living in your home directory (where you happen
to be, if your prompt ain't lying to us).
On 2023-11-07 16:32, gene heskett wrote:
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
/home/gene/vac_ctrl_box.scad
/home/gene/xhome_cable.scad
I dunno.
You can make separate local databases for locate.
maybe try that.
mick
.
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'
On Tue, Nov 07, 2023 at 11:32:21AM -0500, gene heskett wrote:
Greetings all;
[...]
gene@coyote:~$ locate *.scad
/home/gene/vac_ctrl_box.scad
/home/gene/xhome_cable.scad
Markus and The Wanderer were spot on.
As a reminder to all: this "naked" *.scad gets already expanded
by the shell (try "echo *.scad"), so what locate gets to see is
an already expanded list of all files ending in .scad in whatever
directory you happen to be, most probably:
locate vac_ctrl_box.scad xhome_cable.scad
... because these are most probably the only two files matching
that glob pattern living in your home directory (where you happen
to be, if your prompt ain't lying to us).
Shell is handy, but shell is nasty at times.
Cheers
so locate isn't working as I think it should.
try find but it finds the whole my whole local net:
gene@coyote:~$ find .scad . |wc -l
find: ‘.scad’: No such file or directory
On Tuesday 07 November 2023 11:32:21 am gene heskett wrote:
so locate isn't working as I think it should.
try find but it finds the whole my whole local net:
gene@coyote:~$ find .scad . |wc -l
find: ‘.scad’: No such file or directory
Try putting a * before the period in that find command?
On Wed, Nov 08, 2023 at 11:45:30AM -0400, Roy J. Tellason, Sr. wrote:
On Tuesday 07 November 2023 11:32:21 am gene heskett wrote:
so locate isn't working as I think it should.
try find but it finds the whole my whole local net:
gene@coyote:~$ find .scad . |wc -l
find: ‘.scad’: No such file or directory
Try putting a * before the period in that find command?
No, it is more than that. [...]
Putting a * in front of it would get expanded *by the
shell* (not by find), as was discussed elsewhere in this
thread. Find would see the expanded result, so, if e.g.
you have foo.scad, bar.scad and baz.scad in your current
dir, the command actually run would be
find foo.scad bar.scad baz.scad
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 28:23:58 |
Calls: | 6,907 |
Calls today: | 1 |
Files: | 12,376 |
Messages: | 5,427,674 |
Posted today: | 1 |