On Mon, Sep 23, 2019 at 09:02:47PM +0700, Robert Elz wrote: > There is no real standard for this - NetBSD has deprecated the -depth > operator (which never really was one) and replaced it by a -d option > which makes much more sense (-depth never really was the right way to > do it). -depth (the old way) is still supported for compat with old > scripts, but is only mentioned in doc in the STANDARDS section, as:
But... there literally *is* a real standard for this. <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html> -depth The primary shall always evaluate as true; it shall cause descent of the directory hierarchy to be done so that all entries in a directory are acted on before the directory itself. If a -depth primary is not specified, all entries in a directory shall be acted on after the directory itself. If any -depth primary is specified, it shall apply to the entire expression even if the -depth primary would not normally be evaluated. If the POSIX standard isn't real enough, then I don't know what is.