Directory Structures
Directories translate names into organisation. The structure chosen by an operating system affects sharing, naming conflicts, navigation and how easily users can find their files.
/
├── home/
├── student/
│ ├── notes.txt
│ └── projects/
│ └── os-lab.c
└── system/
The familiar hierarchy makes paths meaningful: /home/student/projects/os-lab.c.
Tree: Directories can contain subdirectories.
Real-world analogy: A campus map
Absolute path
/home/student/notes.txt
Starts at the root, so it identifies one location regardless of the current directory.
Relative path
../shared/manual.pdf
Starts at the process’s current directory and uses . or .. to navigate.
Common operations include mkdir to create a directory, list to inspect entries, rename to change a name, and rmdir to remove an empty directory.
1. Which structure naturally supports subdirectories?
2. What does an absolute path begin from?