ls - list directory contents
empty_dir# ls -al total 0 drwxr-xr-x. 2 root root 6 Dec 31 09:49 . dr-xr-x---. 6 root root 284 Dec 31 09:49 .. find - search for files in a directory hierarchy
empty_dir# find . ls - list directory contents
empty_dir# ls -al total 0 drwxr-xr-x. 2 root root 6 Dec 31 09:49 . dr-xr-x---. 6 root root 284 Dec 31 09:49 .. find - search for files in a directory hierarchy
empty_dir# find . find has to deliberately exclude . and ..
It has to avoid descending into them, as it would do for other directories returned by readdir().
Rather than show the directories . and .. but not show any of their contents, it excludes them entirely.
This is the desired behaviour, for example if you used find -exec touch \{\} \;. Users would not wish this command to affect .. (the parent directory).
A satisfactory answer would point to some formal specification which describes this.
Arguably, POSIX is trying to document this. I don't understand well enough to rely on it as a formal spec. But the bolded sentence below suggests that it does not "encounter" . and ...
The find utility shall recursively descend the directory hierarchy from each file specified by path, evaluating a Boolean expression composed of the primaries described in the OPERANDS section for each file encountered. Each path operand shall be evaluated unaltered as it was provided, including all trailing <slash> characters; all pathnames for other files encountered in the hierarchy shall consist of the concatenation of the current path operand, a <slash> if the current path operand did not end in one, and the filename relative to the path operand. The relative portion shall contain no dot or dot-dot components, no trailing <slash> characters, and only single <slash> characters between pathname components.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html
find shows . like shown in the question. ./. is not evaluated. find" case (no arguments), the dot It was provided by find as the search path since GNU find adds it as the default search path if the user does not specify a search path.