[Toybox] Did you know the gnu/dammit find's man page lies?

Rob Landley rob at landley.net
Tue May 28 18:47:05 PDT 2019


The man page says:

              %t     File's last modification time in the format  returned  by
                     the C `ctime' function.


  $ ./find README -printf %t
  Sat Dec 15 19:45:11 2018
  $ find README -printf %t
  Sat Dec 15 19:45:11.9607922010 2018

You can't get nanoseconds from ctime() if its argument is a time_t pointer. (Why
is it a pointer? Why not just the value? Who knows?)

And amazingly, ctime_r does _not_ take a struct timespec *.

So they reimplemented basic libc functions in their command, to add a fairly
obscure sub-option.

<jazzhands />

Rob


More information about the Toybox mailing list