Path normalization
Use dot and dot-dot safely without leaving the simulated filesystem.
Understand the pattern
Path normalization helps spot traversal mistakes.
stat- Inspect a file or directory metadata record, including ownership, permissions, and size.
Metadata and file contents answer different questions.
cd- Change the shell working directory; .. selects the parent and ~ identifies your home.
Changing directories changes how later relative paths resolve.
Worked example and expected result
$ stat ./README.txtPath: /home/learner/README.txt Type: file Mode: -rw-r--r-- Owner: learner Group: learners Size: 148 bytes
Exit status: 0. The command completed successfully in the training fixture.
$ stat notes/../README.txtPath: /home/learner/README.txt Type: file Mode: -rw-r--r-- Owner: learner Group: learners Size: 148 bytes
Exit status: 0. The command completed successfully in the training fixture.
$ cd notes(no output; exit 0)
Exit status: 0. The command completed successfully in the training fixture.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Script metadataTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.