Files, folders and paths
Understand named stored data, containers for names and the route to one item.
- Distinguish a file, directory, filesystem and path.
- Read a simple path from its starting point to a file name.
- Computer
On this page
Why this matters
Commands, applications and networks constantly refer to files. Before using a terminal, you need to know what a name points to and where the search begins.
File, folder and filesystem
A file is named data stored through a filesystem. A directory—often called a folder—organises names for files and other directories. A filesystem supplies the rules and structures that make those names, contents and relationships usable.
An absolute path states a starting point explicitly. A relative path begins from the current directory. The same relative path can therefore identify different items when the current directory changes.
See the relationship
/home/learner/
├── welcome.txt file
├── notes/ directory
│ └── dns.txt file
└── projects/ directory
The drawing shows names and containment. It does not mean folders are physical boxes inside a disk.
Try it
Common mistakes
- A file extension suggests a format; it does not prove the contents.
- A relative path is incomplete without its current directory.
- Creating a directory does not automatically move you into it.
Quick check
If your current directory is /home/learner, what does notes/dns.txt identify? Explain every name in order.
Separate stored instructions from work that is currently running.