Using Directory Commands

Unix has a directory hierarchy that starts at /, sometimes called the root. The directory separator is the slash (/), not the backslash (\). There are several standard subdirectories in the root directory, such as /usr (you'll learn all about them in Directory Hierarchy).

A directory specification is called a path, and one that starts at the root (such as /usr/lib) is a full or absolute path. Similarly, a filename with a full path in front (such as /usr/lib/libc.a) is a full pathname.

The path component identified by two dots (..) specifies the parent of your shell's current directory, and one dot (.) specifies the current directory. For example, if the current working directory of your shell is /usr/lib, the path ../bin ...

Get How Linux Works now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.