3

I was wondering if there's a known reason behind the use of .. to represent the parent of the current directory in most operating systems.

The reason I ask this question is because I think that the colon character (:) could have been a better idea instead. For one, it uses one character less. Also, it can visually represent the concept of "the directory above this directory", since a colon is a dot above a dot, and a dot represents a directory.

But whether you agree with me or not, I'm just curious about the history of .. in operating systems. That's all.

jasonwryan
  • 71,734
  • 34
  • 193
  • 226
  • Conjecture: the convention that files with names beginning with `.` are hidden by default predates the special meanings of `.` and `..`; and part of the reason that `.` and `..` were selected is so that these special entries that appear in every directory would be hidden by default. – Celada Nov 18 '14 at 06:32
  • on a side note, given a unix `/foo/bar/baz` directory. on Multics, in the old days, assumming you are in `bar` directory. You would refer file in `baz` using `bar>baz>myfile` and file in `foo` using `` meaning up and down. As those have a different meaning in linux, they could not be used for files and dirs. – Archemar Nov 18 '14 at 08:41
  • @Celada It might be the other way around. I suspect that `.` and `..` came first, and they were hidden by default, then they developed the convention of using other files beginning with `.` as config files, and also hiding those. – Barmar Nov 18 '14 at 16:42
  • I tried googling "history of unix file system", but none of the papers seem to address this naming convention. Not even Ritchie's conference paper: http://cm.bell-labs.com/who/dmr/hist.html – Barmar Nov 18 '14 at 16:45
  • I suspect they chose `..` rather than `:` because it's easier to type, it doesn't require a shift key. I wonder if it's a coincidence that `.` and `/` are adjacent on the keyboard. – Barmar Nov 18 '14 at 16:48
  • The colon is used as a path separator on unix and linux systems. – stoeff Nov 18 '14 at 18:45
  • 1
    @Barmar I'd suspect that is indeed the case. I remember reading that the convention of having .files hidden was born by a bug in `ls`, where any entry beginning with `.` got hidden. .. Ah yes: http://unix.stackexchange.com/questions/88875/why-are-filenames-that-start-with-a-dot-hidden-can-i-hide-files-without-using-a – muru Nov 19 '14 at 22:12

0 Answers0