This requires BSD stat, not GNU stat. find . -type f -print0 | xargs -0 stat -f "%m %N" | sort -n | cut -d" " -f2 There's probably an equivalent command using GNU stat, but I haven't checked.