Where does '.' and '..' come from?

霸气de小男生 提交于 2020-01-11 17:10:08

问题


What's the story behind our massive repitition of ./foo and cd ... Where do these two . and .. come from? Where could they be seen as a way of navigating a file system tree for the first time?


回答1:


Excerpt from an interview with Ken Thompson (9-6-89):

Every time we made a directory, by convention we put it in another directory called directory - directory, which was dd. Its name was dd and that all the users directories and in fact most other directories, users maintain their own directory systems, had pointers back to dd, and dd got shortened into ‘dot-dot,’ and dd was for directory-directory.




回答2:


I'm sorry I can't answer properly, but I can recommend these links:

  • The Evolution of the Unix Time-sharing System and
  • A Brief history of the BSD Fast File System

for some interesting historical notes on early file systems and their use.

Other than that, the earliest reference I've found is the 1974 paper "The UNIX Time-Sharing System" by Dennis Ritchie and Ken Thompson. The precursor of UNIX, Multics, also had hierarchical file systems and the notion of relative paths, but according to "Introduction to MULTICS" it used another notation for that.




回答3:


I believe it was invented by Dennis Ritchie at Bell Labs in the early years of Unix.



来源:https://stackoverflow.com/questions/280656/where-does-and-come-from

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!