On Sat, Apr 27, 2019 at 10:26 AM Anthony Martin wrote: > From at least V2 to V6, the ls(1) command would not > show directory entries whose names began with a '.' > unless the -a flag was supplied. > > This was changed in V7: only the directory entries > for "." and ".." would be skipped by default. > > All further versions of Research Unix retain the > convention of V7 and Plan 9 ultimately made it > unnecessary. However, BSD and its descendants did > not follow suit. Instead, they continued behaving > like V6 with an additional -A flag to emulate V7. > > Was the initial behavior intentional or just a > matter of expediency? > I believe it's been publicly stated that it was a mistake in early Unix. Apparently, Rob Pike had a Google+ post to this effect back in 2012 (or earlier): I see a reference to it from another mailing list around that time. Unfortunately, the Google+ content is now lost. Rob, do you have a copy? Who made the change and what was their motivation? > Was it a reaction to the intentional hiding of what > came to be known as "dot files"? Speaking from memory, I think the intent was to avoid showing '.' and '..', and that a programming error accidentally hid all dotfiles; probably this went unnoticed because there just weren't many of them at the time. This was corrected in 7th Edition, but the existing behavior had already escaped into the world via Berkeley. I suspect the "dot file" convention came later, as a side-effect of observed behavior of ls. - Dan C.