Dot and dot-dot directories

Most directories contain two special links, . (dot) and .. (dot dot).

. ("dot")
The current directory.
.. ("dot dot")
The directory that this directory appears in.

So, for example, you could list the contents of the directory above your current working directory by typing:

ls ..

If your current directory is /home/fred/.ph/helpviewer, you could list the contents of the root directory by typing:

ls ../../../..

but the absolute path (/) is much shorter, and you don't have to figure out how many "dot dots" you need.

Note: Flash filesystems don't support . and .. entries, but the shell might resolve them before passing the path to the filesystem. You can also set up hard links with these names on a flash filesystem.