Which of the following best describes the difference between an absolute path and a relative path in a folder hierarchy?
Think about how you find a file starting from the main folder versus starting from where you are now.
An absolute path always starts from the root folder (like the main door of a building), while a relative path starts from the current folder (like starting from the room you are in).
You are currently in the folder /home/user/documents. What folder will you reach if you use the relative path ../pictures/vacation?
The .. means go up one folder from your current location.
Starting at /home/user/documents, .. moves up to /home/user. Then adding pictures/vacation leads to /home/user/pictures/vacation.
Given the folder structure below, which path correctly points to the file report.txt located inside the 2024 folder?
/root ├── projects │ ├── 2023 │ └── 2024 │ └── report.txt └── archives
Look carefully at the folder tree and follow the path to report.txt.
The file report.txt is inside the 2024 folder, which is inside projects. So the full path is /root/projects/2024/report.txt.
Which statement correctly compares folder paths in Windows and Unix-like systems?
Think about how you type folder paths in Windows Explorer vs a Linux terminal.
Windows paths use backslashes (e.g., C:\Users\Documents), while Unix-like systems use forward slashes (e.g., /home/user/documents).
How many folder levels are in the following absolute path?
/var/www/html/projects/2024/site/index.html
Count each folder name between slashes, excluding the file name.
The folders are: var, www, html, projects, 2024, site. That is 6 levels. The last part is a file, not a folder.