3 ms·
+1 for ripgrep (it really is a lot faster). Also, I recommend using fd as a replacement for find. It’s API is a bit easier to grok imo, and it’s similarly blaz
by gen220 6y ago
+1 for ripgrep (it really is a lot faster).
Also, I recommend using fd as a replacement for find. It’s API is a bit easier to grok imo, and it’s similarly blazing fast.
fd/rg/fzf are the core tools I end up using most frequently, working in a big monorepo.
- fiddlerwoaroof 6y agoDoes fd actually cover all the same ground as find? I used to be intimidated by find, but these days I find it’s extremely useful for all sorts of otherwise complicated file location operations. For example, to find files newer than a certain date, just use ‘touch’ to set the date of a temp file and then ‘find -newer temp’. Or, I have a script that deduplicates all the regular files in a tree by hard linking them to a file named by the sha256 of the file’s contents ‘find -type f | ( while read -r fn; do ...; done )’ and then, after deleting files or whatever, I can “garbage collect” the shas by deleting files in my link farm that only have one hard link ‘find -links 1 -print -delete’