0

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

Muxecoid
  • 125
  • 4

1 Answers1

2

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

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84