Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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. :(

share|improve this question
up vote 1 down vote accepted

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

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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