Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

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.

share|improve this answer
    
They're instead of Their –  random Sep 11 '09 at 4:10
    
pet peeve of mine, thank you. –  John T Sep 11 '09 at 4:10
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.