[Toybox] [PATCH] find: add -printf support.

Rob Landley rob at landley.net
Sat May 25 19:54:06 PDT 2019


On 5/24/19 6:06 PM, enh via Toybox wrote:
> This only implements the format specifiers that I've seen used in the
> wild (which is actually a significant fraction of the total supported by
> findutils' find). The most obvious gap is in the time support. I'm happy
> to add more, but didn't want to add stuff "just because".

Grumble grumble trying to cut a release... (My own fault for being too slow, the
world doesn't wait for me to catch up on my todo list...)

> I'd say %A@, %C@, and -- for SELinux users -- %Z are probably the most
> plausibly useful formats still missing. I don't think the human-readable
> date formatting is particularly useful unless someone's seen it actually
> used in the wild. The %T+ "full ISO" format being the most likely
> exception to that.

I need to add xattr support to tar. And there's a new cpio xattr proposal
(METADATA!!! entries) I have a window open for that I was hoping to get to this
weekend...

But _after_ release...

> Anyway, this is enough for me get started building AOSP with toybox find.

Let's see, does it...

  find . -type f -printf '%.3s\n'

Of course it does. And this is why I created next_printf().

(Some day, some glorious day,
https://slashdot.org/story/06/09/04/1335226/debian-kicks-jrg-schilling will no
longer be on the posix commitee and then maybe it'll start to matter to
non-solaris users again. Today is not that day.)

Rob



More information about the Toybox mailing list