Sorting All Files in Tree by Modified-Time (in OS X)

This command had to be modified to run under OS X as it, and its heritage, don’t support the “-printf” parameter:

$ find . -print0 | xargs -0 stat -f '%m %N' | sort -k 1,1 -n

Tail of output in my situation:

1469286497 ./dev_import/data/160609_103423/.160609_103423.processing/style-color
1469286497 ./dev_import/data/160609_103423/.160609_103423.processing/upc
1469286541 ./bip/config/log.py
1469286566 ./dev/run_dev.sh
1469286597 ./dev_import/data/160609_103423/events.log.20160723-110946
1469286624 ./dev_import/data/160609_103423/.160609_103423.processing
1469286626 ./dev_import/data/160609_103423
1469286626 ./dev_import/data/160609_103423/events.log.20160723-111026
Advertisements