I have an old messy shell script. One of the steps executes find command with some parameters and expects the results to be sorted by creation time. It works well on old machines (find version is 4.1.7). On newer machines the results of find are not sorted by creation time.

Is there any simple way to tell find to sort the list of files found by file creation time, ascending?

P.S: I tried to read "man find" but it's confusing. :(


find does not provide a mechanism for sorting its output. You will need to postprocess (see -printf).

  • Than I must assume that sort by creation time of old version of find is "not a feature" :( – Muxecoid Apr 28 '11 at 7:38
  • It never was. The filesystem calls were returning them that way. – Ignacio Vazquez-Abrams Apr 28 '11 at 7:39
  • Thanks. The difference between the old and new system is that on old system the files were mounted over NFS and on new system the files are on local ext3 disk. This explains. – Muxecoid Apr 28 '11 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.