Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Alan Newsgroups: comp.os.linux.advocacy,comp.sys.mac.advocacy Subject: =?UTF-8?Q?Re=3A_mdfind_vs_ag_=28was_Re=3A_=E2=80=9C5_MacOS_command_?= =?UTF-8?Q?line_tools_I_swear_by_over_their_GUI_counterparts=E2=80=9D?= Date: Mon, 11 May 2026 10:26:12 -0700 Organization: A noiseless patient Spider Lines: 37 Message-ID: <10tt3fk$19gng$1@dont-email.me> References: <10tbf3n$35vm$1@dont-email.me> <10tfu8k$1c73n$1@dont-email.me> <10tfv4i$1cjn6$1@dont-email.me> <10tg307$1ds9p$1@dont-email.me> <10tg6f7$1f27c$1@dont-email.me> <10tg8lf$1fq2g$1@dont-email.me> <10thoas$1umls$1@dont-email.me> <10ti7h4$249ag$1@dont-email.me> <10tl7su$32i9q$2@dont-email.me> <10tlaji$336rn$1@dont-email.me> <10tnbgp$3kvct$4@dont-email.me> <10tnbol$3d89e$2@dont-email.me> <10tpsv8$bj8g$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 11 May 2026 17:26:13 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1360624"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ZUK4JfyC7iaNK3H3Bem+j8nRQG4iqwgw="; posting-host="c2b7ca832e733c3bca4dc59461098a38" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:NnKeuNtROR+YAKTmh2qZBE8Jx9w= sha256:t23XAJHIzTrnUgFVr2pmAmL4zzdZBB2Odl0AVzUO8kM= sha1:kBabfTVcF0kCNpUdN3lvX6NB3Z0= Content-Language: en-CA In-Reply-To: Xref: csiph.com comp.os.linux.advocacy:712669 comp.sys.mac.advocacy:146026 On 2026-05-10 11:33, rbowman wrote: > On Sun, 10 May 2026 08:16:39 -0400, Chris Ahlstrom wrote: > >> $ locate xyz >> >> This finds about 20 files on this system. > > It finds 134 on mine :) That's what happens when you mess around with GIS > stuff. There are a lot of Python and Node library files to handle tile > requests. The plocate database is 40 MB. My ".Spotlight-V100" directory is 4.3GB... ...less than 0.5% of my 1TB drive... ...and it lets me find every ".py" file on the entire volume in less than a second. I guarantee you that 4.3GB of my RAM is not occupied by a "cached" version of the index. Executing this command on "/" (which has some 2,719,481 files) using the "time" utility: mdfind "kMDItemFSName == '*.py' && kMDItemTextContent == 'cat'" -0 | xargs -0 grep -i -B 3 -A 2 "cat" Which finds ever python file, and prints out 3 lines before and three lines after the "cat" in each... ...took 0.505 seconds. I realize that you Linux advocates have to sign a contract in blood with Linus Torvalds before they're allowed to use Linux, but seriously: Spotlight works excellently, and you just look foolish when you try to compare it to something like "locate".