Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #267246 > unrolled thread

find and it uncommon syntax - grrrrrrrrr

Started bygene heskett <gheskett@shentel.net>
First post2024-02-10 21:50 +0100
Last post2024-02-11 00:30 +0100
Articles 8 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  find and it uncommon syntax - grrrrrrrrr gene heskett <gheskett@shentel.net> - 2024-02-10 21:50 +0100
    Re: find and it uncommon syntax - grrrrrrrrr Nicholas Geovanis <nickgeovanis@gmail.com> - 2024-02-10 22:00 +0100
      Re: find and it uncommon syntax - grrrrrrrrr Greg Wooledge <greg@wooledge.org> - 2024-02-10 22:10 +0100
        Re: find and it uncommon syntax - grrrrrrrrr gene heskett <gheskett@shentel.net> - 2024-02-11 01:30 +0100
    Re: find and it uncommon syntax - grrrrrrrrr Greg Wooledge <greg@wooledge.org> - 2024-02-10 22:00 +0100
      Re: find and it uncommon syntax - grrrrrrrrr gene heskett <gheskett@shentel.net> - 2024-02-11 00:10 +0100
        Re: find and it uncommon syntax - grrrrrrrrr Andy Smith <andy@strugglers.net> - 2024-02-11 00:30 +0100
    Re: find and it uncommon syntax - grrrrrrrrr Andy Smith <andy@strugglers.net> - 2024-02-11 00:30 +0100

#267246 — find and it uncommon syntax - grrrrrrrrr

Fromgene heskett <gheskett@shentel.net>
Date2024-02-10 21:50 +0100
Subjectfind and it uncommon syntax - grrrrrrrrr
Message-ID<I62sp-9hD0-5@gated-at.bofh.it>
Greetings;

I have misplaced file someplace in /home/gene.
its name is bpim5*shelf.scad
As usual it outputs 100,000 filenames, none of which is the one I am 
looking for. How in heck do you shut this thing up so it only spits out 
/the/path/to/the/file its looking for it it even found it?

And where do I put that as an alias, in my .bashrc?

Cheers, Gene Heskett, CET.
-- 
"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

[toc] | [next] | [standalone]


#267247

FromNicholas Geovanis <nickgeovanis@gmail.com>
Date2024-02-10 22:00 +0100
Message-ID<I62C5-9hGz-3@gated-at.bofh.it>
In reply to#267246

[Multipart message — attachments visible in raw view] — view raw

On Sat, Feb 10, 2024, 2:46 PM gene heskett <gheskett@shentel.net> wrote:

> Greetings;
>
> I have misplaced file someplace in /home/gene.
> its name is bpim5*shelf.scad
>

Assuming that you are searching in the current working directory:
 find bpim*  -print | grep 'shelf.scad'

As usual it outputs 100,000 filenames, none of which is the one I am
> looking for. How in heck do you shut this thing up so it only spits out
> /the/path/to/the/file its looking for it it even found it?
>
> And where do I put that as an alias, in my .bashrc?
>
> Cheers, Gene Heskett, CET.
> --
> "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
>
>

[toc] | [prev] | [next] | [standalone]


#267250

FromGreg Wooledge <greg@wooledge.org>
Date2024-02-10 22:10 +0100
Message-ID<I62LL-9hYW-1@gated-at.bofh.it>
In reply to#267247
On Sat, Feb 10, 2024 at 02:58:24PM -0600, Nicholas Geovanis wrote:
> On Sat, Feb 10, 2024, 2:46 PM gene heskett <gheskett@shentel.net> wrote:
> 
> > Greetings;
> >
> > I have misplaced file someplace in /home/gene.
> > its name is bpim5*shelf.scad
> >
> 
> Assuming that you are searching in the current working directory:
>  find bpim*  -print | grep 'shelf.scad'

That's not correct.  The argument(s) that immediately follow find should
be the starting point(s) where it will begin its search.  Normally these
would be directories, especially the "." directory, which is actually
the default in GNU find (but not a default in POSIX find).

This command would only work if the file Gene's looking for happens to
be in his home directory, *or*, if the file he's looking for happens to
be underneath a *directory* whose name matches the bpim* glob.  This is
possible, but I wouldn't count on it.

[toc] | [prev] | [next] | [standalone]


#267261

Fromgene heskett <gheskett@shentel.net>
Date2024-02-11 01:30 +0100
Message-ID<I65Tj-9jMt-7@gated-at.bofh.it>
In reply to#267250
On 2/10/24 16:07, Greg Wooledge wrote:
> On Sat, Feb 10, 2024 at 02:58:24PM -0600, Nicholas Geovanis wrote:
>> On Sat, Feb 10, 2024, 2:46 PM gene heskett <gheskett@shentel.net> wrote:
>>
>>> Greetings;
>>>
>>> I have misplaced file someplace in /home/gene.
>>> its name is bpim5*shelf.scad
>>>
>>
>> Assuming that you are searching in the current working directory:
>>   find bpim*  -print | grep 'shelf.scad'
> 
> That's not correct.  The argument(s) that immediately follow find should
> be the starting point(s) where it will begin its search.  Normally these
> would be directories, especially the "." directory, which is actually
> the default in GNU find (but not a default in POSIX find).
> 
> This command would only work if the file Gene's looking for happens to
> be in his home directory, *or*, if the file he's looking for happens to
> be underneath a *directory* whose name matches the bpim* glob.  This is
> possible, but I wouldn't count on it.
> 
Especially here. I resaved it, after a couple mods, in 
3dp-stf/genes-nas.  So searching thru all the children of "." should be 
the expected behavious. But finding that fraudulent pile of 2T disks was 
as bogus as a $3 bill, upsets my plans. The only usb-sata adapter I 
trust is StarTech, and its cable is 3x longer than I need. This bogus 
drive came sealed in a case that I had printed supports for that fit in 
2 shelf spaces, leaving room in the bottom of the care for a psu.  The 
sata package is bigger but would take 3 spaces for 6 of them, exiling 
the psu external to the cage.  So this job now printing is 4 more 
shelves, w/o the pi bolt pattern.  3dprinting is hard on memory, I've 
12G of 3dp.stf now.  Slicers and such are plain stupid, generating as 
much as 2 gigabytes for one complex part that takes 3 days to run. I've 
written 3 days jobs for a milling machine In 90 LOC because linuxcnc 
understands loops, none of the slicers or machines do, so the file you 
feed the printer is totally unrolled. And 10 to 30 times the size needed 
if the part file was converted from additive to subtractive.  It may get 
there, but probably after I miss roll call.

Thanks Greg.  Take care.
> .

Cheers, Gene Heskett, CET.
-- 
"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

[toc] | [prev] | [next] | [standalone]


#267248

FromGreg Wooledge <greg@wooledge.org>
Date2024-02-10 22:00 +0100
Message-ID<I62C5-9hGz-5@gated-at.bofh.it>
In reply to#267246
On Sat, Feb 10, 2024 at 03:46:09PM -0500, gene heskett wrote:
> I have misplaced file someplace in /home/gene.
> its name is bpim5*shelf.scad
> As usual it outputs 100,000 filenames, none of which is the one I am looking

cd
find . -iname 'bpim5*shelf.scad'

[toc] | [prev] | [next] | [standalone]


#267253

Fromgene heskett <gheskett@shentel.net>
Date2024-02-11 00:10 +0100
Message-ID<I64DT-9j83-3@gated-at.bofh.it>
In reply to#267248
On 2/10/24 15:55, Greg Wooledge wrote:
> find . -iname 'bpim5*shelf.scad'

Thank you Greg, it worked and 4 more copies are under construction now, 
but why is this not in the man page? Mind boggling.

Cheers, Gene Heskett, CET.
-- 
"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

[toc] | [prev] | [next] | [standalone]


#267255

FromAndy Smith <andy@strugglers.net>
Date2024-02-11 00:30 +0100
Message-ID<I64Xf-9jee-5@gated-at.bofh.it>
In reply to#267253
Hello,

On Sat, Feb 10, 2024 at 06:03:39PM -0500, gene heskett wrote:
> On 2/10/24 15:55, Greg Wooledge wrote:
> > find . -iname 'bpim5*shelf.scad'
> 
> Thank you Greg, it worked and 4 more copies are under construction now, but
> why is this not in the man page? Mind boggling.

Why can Gene not locate "iname" when it's right there in the "find"
man page? Mind boggling.

Why can Gene not type "how do I use GNU find to find a file by
name" into a web search engine and read any of the several links on
the first page of results? Mind boggling.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [next] | [standalone]


#267254

FromAndy Smith <andy@strugglers.net>
Date2024-02-11 00:30 +0100
Message-ID<I64Xf-9jee-1@gated-at.bofh.it>
In reply to#267246
Hello,

On Sat, Feb 10, 2024 at 03:46:09PM -0500, gene heskett wrote:
> I have misplaced file someplace in /home/gene.
> its name is bpim5*shelf.scad
> As usual it outputs 100,000 filenames, none of which is the one I am looking
> for. How in heck do you shut this thing up so it only spits out
> /the/path/to/the/file its looking for it it even found it?

Gene and his inability as usual to show us what he has tried and the
output he got - grrrrrrrrr

> And where do I put that as an alias, in my .bashrc?

find is an extremely flexible command that can do a lot of different
queries so to get any sort of meaningful answer to this you'd have
to show us what exactly you tried.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web