66
submitted 11 months ago by Sunshine@lemmy.ca to c/linux@programming.dev
all 22 comments
sorted by: hot top new old
[-] nous@programming.dev 18 points 11 months ago* (last edited 11 months ago)

Also if you are looking for a replacement for find that is not a full tui then take a look at fd which works more like what the author expected from the find commad - fd <pattern>.

[-] sxan@midwest.social 1 points 11 months ago* (last edited 11 months ago)

~~Plus, IIRC fd does breadth-first search, which leads to faster finds in the most common cases.~~

I've been corrected. fd doesn't do this; other find replacements exist that do, though.

[-] mke@programming.dev 2 points 11 months ago

I don't think so, where did you get that? Last I checked, they weren't interested in adding it. That's why tools like bfs exist.

[-] sxan@midwest.social 2 points 11 months ago

Oh. I'm just straight up wrong about that; I thought I'd read that about it back when I first started using it regularly.

I'm just attributing it to some other tool. Bad info, sorry!

[-] mke@programming.dev 1 points 11 months ago

It's cool, thanks for correcting.

[-] notabot@lemm.ee 13 points 11 months ago

find can be a bit slow because it enumerates every directory recursively from the root you specified, but it let's you do a lot more than just search by name. locate is available on most distros and give fast results, albiet from when the index was last rebuilt (usually nightly). They both have the vital property that they output a list of files to stdout for further processing.

[-] ObsidianZed@lemmy.world 5 points 11 months ago

It's worth mentioning you can manually kick off an index build with I believe updatedb (in most cases).

[-] Tja@programming.dev 3 points 11 months ago

+1 for locate and updatedb. It works on macos too.

[-] pglpm@lemmy.ca 8 points 11 months ago

Sounds fantastic, but unfortunately none of the instructions for Debian-based, or the pre-compiled binary, or the building from source worked.

[-] sin_free_for_00_days@sopuli.xyz 7 points 11 months ago

So many linux posts seem to be new people getting frustrated at their lack of knowledge and trying to reinvent something that already exists. I'm looking at this thinking, why didn't they just use locate and fzf?

[-] originalucifer@moist.catsweat.com 5 points 11 months ago

this looks beautiful. find has always driven me a bit batty.

https://github.com/alexpasmantier/television?tab=readme-ov-file

[-] emb@lemmy.world 3 points 11 months ago

Love reading about the author's struggle with find, it really resonates. I have the same terrible experience every time I try to use it.

[-] sudo@programming.dev 3 points 11 months ago

It literally looks like a clone of fzf or sk complete with prompt and file previews. The fact that ithe article doesn't event reference the prior art is deeply concerning.

[-] Zykino@programming.dev 2 points 11 months ago

I'm with the others: fd default syntax is easier to remember.

And for the interactive search I'm using skim. With it I cd to the dir I want and Alt t to trigger fuzzy finding. There are also bindings to search for dir or in the history. The neat part is that results are inserted as is in the command line, no need to xargs or copy them. It also make the history look like I always know where the files I want are when in reality they are just fuzzy-found

[-] wwb4itcgas@lemm.ee 2 points 11 months ago

Eh, tried it. Doesn't seem to support regex or even wildcard matching, which is... suboptimal. The preview window also often fails to show the content of the current file correctly.

[-] _thebrain_@sh.itjust.works 2 points 11 months ago

I always just use

find | grep -i <partial file name>
[-] Jumuta@sh.itjust.works 5 points 11 months ago

just use fd at that point

[-] FizzyOrange@programming.dev 2 points 11 months ago

Well that's clearly worse... Why even make this comment?

[-] Tja@programming.dev 5 points 11 months ago

Because sometimes people want to share solutions that work for them. A clunky solution that you remember is better than the optimal solution you can't access.

[-] avidamoeba@lemmy.ca 2 points 11 months ago

Why can’t I remember the find parameters?

I don't know. Perhaps write a couple of aliases?

[-] beeng@discuss.tchncs.de 2 points 11 months ago

Looks like I'm gonna give it a whirl

this post was submitted on 08 Mar 2025
66 points (97.1% liked)

Linux

12183 readers
301 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS