3

Just what it says. Do they have a name besides "those dot thingies"?

hippietrail
  • 4,605

2 Answers2

5

They're called directory abbreviations.

. = current directory
.. = parent directory

See this question for a bit more information. Section 2.13 (CTRL-F for 2.13) on this page also covers them.

2

They're normally called 'dot' and 'dot-dot' in my experience. I don't know that they have a collective name - they're just the entries that hold the hierarchical file system together, and they aren't shown by 'ls(1)' by default because they're always there (and other names beginning with dot are also not shown).

As John T says, they're meanings are fixed - dot is a name for the current directory, and dot-dot is a name for the parent directory.

If you look at a Unix 7th Edition manual, you'd find that there wasn't a mkdir(2) system call, but the super-user could use the link(2) system call to make the dot and dot-dot entries in a directory (and mknod(2) to make the directory), and the mkdir(1) program was, consequently, a setuid root program that did the job properly. If misused, you could end up with an incorrectly hierarchical file system - and one of the jobs of the fsck(8) program was to check for, and if necessary fix, mis-assembled directory hierarchies.