Computer foundationsUnit 2 of 3
Beginner18 minIn reviewreview

Files, folders and paths

Understand named stored data, containers for names and the route to one item.

What you will learn
  • Distinguish a file, directory, filesystem and path.
  • Read a simple path from its starting point to a file name.
Know this first
  • Computer
Start this unit
Last verifiedReview every 730 days
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

TRY IT HERE

Create a folder, enter it and create one file.

Deterministic simulator: no real shell, network or access to your files.

Suggested sequence

$ …

What happened: The current directory changed; the file exists only inside the virtual filesystem.

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.

Next stepProgram and process

Separate stored instructions from work that is currently running.