Without notes, state yesterday’s main idea and one unresolved question.
Files, folders, paths, and extensions
Orientation, CLI, and the Web
Objective
Navigate the filesystem deliberately rather than relying only on graphical file browsers.
Treat the web as a connected system: the browser is a control panel, HTTP is the protocol, the server is the controller, and the database is persistent storage.
- absolute versus relative paths
- file extensions
- current working directory
Why this matters
Every program you write will open, read, and save files, and every one of those operations needs an answer to "which file, exactly?" Today you learn how a computer answers that question — paths, folders, and the idea of where you currently are.
Today is also a human-only checkpoint: no AI assistance. That is not a punishment. The purpose of a human-only checkpoint is to verify you can reason and work through a problem without generated answers — proof that the skill is yours, not the tool's. Navigating a filesystem only gets into your fingers by doing it unaided, and if you cannot move around one without help, every later day gets harder in a way that is hard to diagnose.
Folders, files, and the tree
A filesystem is a tree. One folder contains files and other folders, each of which contains more, and so on down. Folders are also called directories — same thing, and the command line prefers "directory".
home/
└── fullstack-journey/
├── setup-notes.md
└── notes/
└── day-03.md
Two rules that follow from the tree shape: every file sits in exactly one folder, and its full
identity is the whole chain of folders leading to it — not just its name. Ten files can be called
README.md with no conflict, as long as they are in different folders.
Reference designators
A schematic has many resistors called R1. What makes one unambiguous is the board it is on: board A, R1 is a different component from board B, R1. A file path is the same idea — the name alone is not the identity, the location plus the name is.
Where you are: the working directory
The terminal is always inside one directory, called the current working directory. Commands that mention files look there first. This is the single most important thing to know about the terminal, and the source of most beginner confusion: the same command gives different results depending on where you are standing.
pwd — "print working directory" — tells you where you are:
pwd
/Users/you/fullstack-journey
Standing in a room
The working directory is the room you're standing in. "Pick up the blue folder" means the one
in this room. Walk to another room and the same sentence refers to a different object — or to
nothing at all. pwd is looking up at the room number on the door.
Absolute vs. relative paths
A path is the text that identifies a file or folder. There are two ways to write one.
An absolute path starts from the root of the tree and gives the complete chain. On macOS and
Linux it starts with /; on Windows with a drive letter like C:\.
/Users/you/fullstack-journey/setup-notes.md
It means the same thing typed from anywhere. Complete, unambiguous, long.
A relative path starts from wherever you currently are.
setup-notes.md
notes/day-03.md
Short and convenient, but it only means something in the context of your working directory.
Two special names appear in relative paths everywhere:
| Symbol | Means |
|---|---|
. |
the current directory |
.. |
the parent directory, one level up |
~ |
your home folder (a handy shortcut) |
So ../setup-notes.md means "go up one level, then find setup-notes.md".
Ten seconds, right now
Run pwd, then cd .., then pwd again. Watch the path get shorter by one segment. Then
cd - to jump back to where you were. You just moved up the tree and back.
File extensions
The end of a filename after the last dot — .md, .js, .json, .html — is the extension.
It is a convention, a hint about what the file contains, not an enforced rule. Renaming
photo.jpg to photo.txt does not change a single byte inside it; it only misleads the programs
that trust the name.
Extensions matter because tools use them to decide behaviour: your editor picks syntax colouring
by extension, and Node decides how to treat a file by whether it ends in .js or .json.
Hidden extensions lie to you
macOS Finder and Windows Explorer hide known extensions by default, so notes.md may display
as notes, and a file that looks like report.pdf might really be report.pdf.exe. Turn
extensions on — Finder → Settings → Advanced → "Show all filename extensions"; Explorer → View
→ "File name extensions". The terminal always shows the truth.
Walkthrough: the six commands
Open your terminal and follow along. These six do almost all day-to-day navigation.
cd ~ # go to your home folder
pwd # where am I?
ls # what's in here?
ls lists the contents of the current directory (dir in Windows PowerShell also works).
ls -la shows more: hidden files and details. The -la part is a flag, an option that
changes what a command does — Day 4 covers flags properly.
mkdir path-practice # make a directory
cd path-practice # move into it
pwd # confirm you moved
mkdir makes a directory; cd changes directory. Notice you confirmed the move with pwd
rather than assuming — the Day 2 habit, applied.
touch hello.md # create an empty file
ls # confirm it exists
touch creates an empty file if it doesn't exist. (Windows PowerShell: New-Item hello.md.)
rm hello.md # delete the file
ls # confirm it's gone
`rm` does not use the Recycle Bin
Files removed with rm are gone immediately — no trash, no undo. Only ever run it on paths you
have read carefully, and never with a path you don't fully understand. Practise on disposable
folders like this one, which is exactly why today's lab uses a throwaway directory.
Checkpoint
You should be able to say what each of pwd, ls, mkdir, cd, touch, and rm does, in
your own words, without looking at this page.
Your turn
Do this without AI assistance and without copying from above — look away from the screen and use
--help or your memory when stuck.
From your home folder,
cdintofullstack-journey. Confirm withpwd.Create a folder called
notesand another calledexperiments.Create a
README.mdat the top level offullstack-journey.cdintonotes, createday-03.md, then return tofullstack-journeyusing a relative path (..), not an absolute one.Inside
experiments, create a disposable folderscratch, put two files in it, then delete both withrmand remove the folder withrmdir scratch.Run
ls -laat the top offullstack-journeyand check your tree matches:fullstack-journey/ ├── README.md ├── setup-notes.md ├── experiments/ └── notes/ └── day-03.mdNow the real exercise: close the terminal, open a fresh one, and recreate the same structure from memory in a folder called
path-practice-2. Delete it when you're done. If you had to look something up, do it once more.
Common pitfalls
- Running a command in the wrong directory. The command works, the file lands somewhere
unexpected. Run
pwdbefore anything that creates or deletes. - Spaces in names.
cd my folderreads as two arguments and fails. Quote it —cd "my folder"— or avoid spaces entirely. Prefermy-folder. - Confusing
/at the start./notesis an absolute path from the root of your whole disk;notesis a folder here. That leading slash changes everything. - Assuming
rmis recoverable. It isn't. Read the path twice before Enter.
Verify it yourself
Open today's reference, MDN's Command line crash course, and find its section on navigating the filesystem.
- MDN lists a couple of navigation commands this lesson did not cover. Find one and work out what it does from the docs alone — no AI.
- Does MDN describe the working directory the same way this lesson did? Find the sentence.
Write the extra command and your own one-line definition into notes/day-03.md. Learning a tool
from its documentation, unaided, is the skill today is really testing.
The hour
- 0–5 min Recall
- 5–20 min Learn
Read only the listed concept notes and official reference sections needed today.
- 20–48 min Build
Use pwd, ls, mkdir, cd, touch, and rm on a disposable practice folder. Recreate the final structure without looking.
- 48–55 min Explain and verify
Run the result, inspect evidence, and explain the data/control flow in your own words.
- 55–60 min Quiz and commit
Complete the quiz, record one lesson, and commit the verified change when applicable.
What to hand in
A practice tree with notes/, experiments/, and README.md.
Working with AI today
Do the core exercise without AI. Use documentation and debugging evidence. AI may review only after completion.
References
End-of-day quiz
Explain-back gate
Pass the quiz above to unlock completion.
Quiz + explain-back checks required.