Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

A Quick Introduction to Unix/Special Directories

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

The abbreviated directories . and .. The directories named . and .. are relative names. They are interpreted by the shell in the current context. While this takes a moment or two longer to grasp than ordinary absolute directory names, it is a very useful thing about Unix. In any directory you can type % ls -a As you will see, there are two directories listed called (.) and (..). These appear in all Unix directories. Current directory (.) In Unix . means the current directory, so typing % cd . means that you stay where you are. This may not seem very useful at first, but you will often find it very useful – remember that it is a relative directory name. Parent directory (..) .. means the parent of the current directory, so typing % cd .. will take you up one directory. Home directory (~) Typing cd alone or cd ~ always returns you to your home directory. This is very useful if you are lost in the file system. Typing cd / takes you to the root. What do you think % ls ~/.. would list?