find: multiple "-exec" for list of files not working? I am trying to figure this out on an Android phone running Oreo / 8.0, with toybox 0.7.3-android.

I am trying to get a list of files inside a folder and their respective mtime. I am running this command:

find . -type f -exec stat -c %n {} \; -exec stat -c %Y {} \; -exec stat -c %y {} \;


or

find . -type f -exec stat -c %n "{}" \; -exec stat -c %Y "{}" \; -exec stat -c %y "{}" \;


In both cases I am only getting the result from the first invocation of "stat". Am I overseeing something or is this the way toybox works on Android?

The output file should look like this:

./file1.txt
1553516120
201903251315.20
./file2.txt
1549678694
201902090318.14
./file3.txt
1553541066
201903252011.06
./file4.txt
1553515882
201903251311.22
./file5.txt
1585138731
202003251318.51


EDIT: This is apparently a bug in toybox. I reported it and the working fix is currently awaiting to be merged into the source code of toybox.
This should work:

find . -type f | xargs -I {} stat --printf='%n \n %Y \n %y \n\n' '{}'


But Android's limited toybox stat doesn't support --printf formatting. So either use stat binary with full options e.g. from Termux or statically built, or you need to do one step extra:

find . -type f | xargs -I {} stat -c '%n--%Y--%y--' '{}' | sed 's/--/\n /g'