Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This Folder hierarchy and file paths worksheet is part of the WA Computer Science ATAR Year 11 — Network Communications journey. Print it as a booklet?
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1C:\Users\Sam\file.txt | AA relative path starts at the current folder, so from inside docs it looks for docs/docs/report.txt, which does not exist. | |
| 2/home/sam/file.txt | Bdocs/report.txt | |
| 3A relative path locates a file starting from the current folder, not from the root | CThe .. means go up one folder, so the path leads to /home/sam/file.txt, not into the docs folder. | |
| 4A network drive path locates a file on another computer using the server name and a shared folder | DAn absolute Windows path starting at the C: drive root and going down through the Users and Sam folders to file.txt | |
| 5/home/sam/docs/../file.txt typed as the path to docs/file.txt | EAn absolute Linux path starting at the root / and going through the home and sam folders to file.txt | |
| 6Using the relative path docs/report.txt from inside the docs folder | F\\server\shared\file.txt |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
file path — The location of a file in the folder tree, written from the root (absolute, e.g. /home/sam/file.txt) or from the current folder (relative).C:\Users\Sam\file.txt/home/sam/file.txt../notes/file.txt\\server\share\file.txtcd /home/sam
cat ./file.txt