find doesn't sort files¹.
ls can sort files by modification time, but if you do:
find subtree -exec ls -td {} +
And the list of files is too big to fit in the limit of the size of arguments+environment passed to a command, that will end up running several ls invocations which will be sorted independantly.
Easiest would be to use zsh whose globs can do most of what find can do and sort the list based on various criteria including last modification time:
print -rC1 -- subtree/**/*(NDom)
Or to pass to another command in that order:
print -rNC1 -- subtree/**/*(NDom) | xargs -r0 another command
Or just:
another command subtree/**/*(NDom)
If the list is small enough to fit in one external command invocation.
Change o to O to reverse the order (and have the oldest files first).
Or you could use perl to do the sorting:
find subtree -print0 | perl -MTime::HiRes=lstat -l -0e '
print $_->[1] for sort {$b->[0] <=> $a->[0]} map {[(lstat$_)[9], $_]} <>'
Or to pass to another command:
find subtree -print0 | perl -MTime::HiRes=lstat -0le '
print $_->[1] for sort {$b->[0] <=> $a->[0]} map {[(lstat$_)[9], $_]} <>' |
xargs -r0 another command
Swap $a and $b to reverse the order.
If you can guarantee that no file path contains newline directories (though in practice no Unix-like system that I know forbids those), you can use the BSD stat command to print the timestamp with subsecond precision:
find subtree -exec stat -f %Fm%t%N {} + |
LC_ALL=C sort -rn |
cut -f2-
To pass to another command:
find subtree -exec stat -f %Fm%t%N {} + |
LC_ALL=C sort -rn |
cut -f2- |
LC_ALL=C tr '\n' '\0' |
xargs -r0 another command
Remove the -r option of sort to reverse the order.
Beware files that cannot be lstat()ed will be skipped.
If, as suggested by your other recent questions, your "BSD" is actually Solaris 10 (which you had already confused for a BSD), your best bet among those is probably the zsh approaches (as Solaris 10 does come with zsh; a 20 year old version but recent enough for this purpose), though note that the xargs in Solaris 10 doesn't support -r nor -0 (which have only been added to the 2024 edition of the POSIX standard).
From another shell:
zsh -c 'print -rC1 -- subtree/**/*(NDom)'
zsh -c 'another command subtree/**/*(NDom)'
Or if the list is too large, use zsh's zargs autoloadable function rather than the very limited xargs from Solaris:
zsh -c 'autoload zargs; zargs subtree/**/*(NDom) -- another command'
¹ Well strictly speaking, you may find that some find implementations internally sort directory entries by inode number in an attempt to reduce the number of head seeks on rotational hard drives.
findwhich is available for most systems including BSD ones (even if not always installed by default) be an option?