Reputation: 23443
I was searching through the man pages for find for clues of UNIX find command default ordering.
Appreciate if anyone knows this.
http://unixhelp.ed.ac.uk/CGI/man-cgi?find
Upvotes: 2
Views: 1213
Reputation: 143906
The find command uses the opendir()
function to get listings in a directory, which returns a directory stream, and it traverses the stream and evaluates each entry. The ones that matches criteria are returned in the order they are evaluated. Therefore, the order you get from the find
command is how the underlying filesystem presents them.
Upvotes: 2
Reputation: 30833
find
just peeks the files and subdirectories as they appear in the directories, just like ls -U
when this option is available.
Upvotes: 4