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

Re: locate question



On Tue, Nov 07, 2023 at 08:38:51PM +0100, tomas@tuxteam.de wrote:
> 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).

And THAT is why we like to see the shell prompt along with the
command and its output.  It tells us (or gives us strong hints about)
the current working directory and whether the command is being executed
as a normal user or a UID=0 user.


Reply to: