Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What do you call the opposite of the root directory in a file path, for instance:


How would you refer to the directory


in a generic way and it is not the PWD does it have a certain name?

share|improve this question
The term root is loosely based on a tree metaphor. As such, I would consider each subdirectory to be a "branch" (and a file to be a "leaf")...though the metaphor rather breaks down in the event of symbolic links! – Graham Wager Dec 27 '12 at 10:13
Thanks @GrahamWager I guess the question is, if you snap a branch off what’s the leaf at the thin end called? – squarebear Dec 27 '12 at 10:20
I'd say they're all just branches until you hit a leaf. I'm not even sure there's an "official" thing to call it, other than just a directory or if active the current directory... – Graham Wager Dec 27 '12 at 10:27
up vote 3 down vote accepted

The last segment of a path is usually called the tail. The earliest use of the term that I know of was by Bill Joy in An Introduction to the C shell, page USD4:28, where he described the C shell's :t tail operator.

share|improve this answer
Thanks this seems the most correct to me, I will see how the votes are later and accept "the winner" as judged by the people. – squarebear Dec 27 '12 at 11:06

I don't think there is a well-known and unambiguous single-word for that.

  • You can call it the local name of the file's directory.

  • You can call it the basename of the directory path.

  • You could argue that a directory is never more than a single element of a path and therefore it is the local directory

  • You could adopt the idea mentioned in Graham's comment and call it a leaf directory

Whatever you do is likely to need some accompanying explanation or example.

share|improve this answer
Seems to me that just calling it a "subdirectory" would suffice. – martineau Dec 27 '12 at 13:19

Your Answer


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.