The file and its address
Quick check: can you make the page, write its path, and read one ls -la line?
Pass at 70%. Feedback appears as you go, and only your first answer to each question counts.
Show answer
Answer:
The leading - means this is a regular file, not a directory. The 12 is the size in bytes.
A full-credit answer shows: A strong answer covers: (1) - is the type character for a regular file (d would be a directory); (2) 12 is the size in bytes.
Type character first, size after owner and group. The name at the end is index.html. Permissions exist but you only needed those two fields here (objective 8).
Sample answer
The leading - means this is a regular file, not a directory. The 12 is the size in bytes.
A full-credit answer shows
A strong answer covers: (1) - is the type character for a regular file (d would be a directory); (2) 12 is the size in bytes.
Type character first, size after owner and group. The name at the end is index.html. Permissions exist but you only needed those two fields here (objective 8).
Show answer
Answer:
./first-site is the first-site folder inside the current directory, ~/projects. ../projects/first-site goes up to home, then back into projects/first-site — the same folder, the long way round.
A full-credit answer shows: A strong answer covers: (1) . means here, so ./first-site is ~/projects/first-site; (2) .. means the folder above, so the longer path is also ~/projects/first-site.
Both paths name the same folder if you started in ~/projects. . is here; .. is up one. The first character is not /, so both are relative (objectives 4, 5).
Sample answer
./first-site is the first-site folder inside the current directory, ~/projects. ../projects/first-site goes up to home, then back into projects/first-site — the same folder, the long way round.
A full-credit answer shows
A strong answer covers: (1) . means here, so ./first-site is ~/projects/first-site; (2) .. means the folder above, so the longer path is also ~/projects/first-site.
Both paths name the same folder if you started in ~/projects. . is here; .. is up one. The first character is not /, so both are relative (objectives 4, 5).
Show answer
Answer: True
Default APFS is case-insensitive (and case-preserving), so those two names land on one file. On Linux they are two files. A site that works on a Mac can 404 on a Linux server over one capital letter (objective 6).
Default APFS is case-insensitive (and case-preserving), so those two names land on one file. On Linux they are two files. A site that works on a Mac can 404 on a Linux server over one capital letter (objective 6).
Show answer
Answer: This file on this machine, as a path the browser can follow
A file:// URL is the same path you already have, written so a browser can open it. It is not a public address, it is not a server, and the Desktop is the wrong home for this project (objectives 1, 2).
A file:// URL is the same path you already have, written so a browser can open it. It is not a public address, it is not a server, and the Desktop is the wrong home for this project (objectives 1, 2).
Show answer
Answer: /home/sam/projects/first-site/index.html
An absolute path starts with /. ~ and ./ are useful abbreviations, and projects/… is relative — none of those start from the top of the machine (objective 4).
An absolute path starts with /. ~ and ./ are useful abbreviations, and projects/… is relative — none of those start from the top of the machine (objective 4).
Show answer
Answer: They stayed the same — only the name changed
The tempting wrong idea is that the extension converts the file. It does not. The name is a hint about which program to launch. The bytes are whatever you typed (objective 7).
The tempting wrong idea is that the extension converts the file. It does not. The name is a hint about which program to launch. The bytes are whatever you typed (objective 7).