[ale] find + ls commands: commentary [was: Bash script]
Ron
admin at bclug.ca
Tue Apr 15 15:30:55 EDT 2025
Bob Toxen via Ale wrote on 2025-04-14 18:59:
> WOW!
>
> find . -exec something \+
> ^^
>
> Never heard of it!
This is my favourite thing about LUGs - learning of some tool or option
that's been there all along that I wasn't aware of. I love when that
happens.
> Not in "man find" on any system of mine, except my
> newest,
That's odd, I've been using it for ages. I wonder when it was introduced?
Another new option discovery: `apt changelog findutils` shows it from 2005:
> - find supports -exec ... {} +
> findutils (4.2.14-1) experimental; urgency=low
> -- Andreas Metzler <ametzler at debian.org> Tue, 25 Jan 2005 11:40:21 +0100
The man page is kinda opaque, searching `man find` for " -exec" gives:
> -exec command ;
> ...
Then, the NEXT hit gives:
> -exec command {} +
> ...
So, it's possible to overlook the second entry. (And, why doesn't the
first entry include the {} ?)
Further along are these:
> -execdir command ;
>
> -execdir command {} +
I was either unaware or had forgotten about these - they could be really
handy for something like generating hashes meant to exist in same
directory as the hashed file, etc.
I'll be looking for opportunities to try these.
New knowledge, awesome!
More information about the Ale
mailing list