Keyboard and generated files
Quick check: can you stand in the folder, rebuild it, and generate the page with > and |?
Pass at 70%. Feedback appears as you go, and only your first answer to each question counts.
Show answer
Answer:
Bare cd goes home ($HOME). cd - then jumps back to ~/projects/first-site and prints that path.
A full-credit answer shows: A strong answer covers: (1) bare cd goes to home; (2) cd - returns to the previous directory and prints it.
Bare cd is home. cd - toggles and prints the destination. Confirm with pwd (objective 3).
Sample answer
Bare cd goes home ($HOME). cd - then jumps back to ~/projects/first-site and prints that path.
A full-credit answer shows
A strong answer covers: (1) bare cd goes to home; (2) cd - returns to the previous directory and prints it.
Bare cd is home. cd - toggles and prints the destination. Confirm with pwd (objective 3).
Show answer
Answer:
ls -la lists the folder. grep html keeps the lines that mention html. wc -l counts those lines. Nothing is written to disk unless you add > or >>.
A full-credit answer shows: A strong answer covers: (1) list; (2) filter lines containing html; (3) count those lines; (4) the pipe does not write a file by itself.
Each stage reads what the previous stage printed. The pipe is a connection, not a save (objective 8).
Sample answer
ls -la lists the folder. grep html keeps the lines that mention html. wc -l counts those lines. Nothing is written to disk unless you add > or >>.
A full-credit answer shows
A strong answer covers: (1) list; (2) filter lines containing html; (3) count those lines; (4) the pipe does not write a file by itself.
Each stage reads what the previous stage printed. The pipe is a connection, not a save (objective 8).
Show answer
Answer: True
-p makes parent directories as needed and does not complain if they already exist. Without it you get No such file or directory (objective 4).
-p makes parent directories as needed and does not complain if they already exist. Without it you get No such file or directory (objective 4).
Show answer
Answer: False
The opposite is true. rm has no trash and no undo. Copy the file out first if you still need it (objective 5).
The opposite is true. rm has no trash and no undo. Copy the file out first if you still need it (objective 5).
Show answer
Answer: The shell is standing in a different folder, so the same command lists different files
The command did not change. The vantage point did. pwd would print a different path after the cd (objectives 1, 2).
The command did not change. The vantage point did. pwd would print a different path after the cd (objectives 1, 2).
Show answer
Answer: Moves a into b, so the result is b/a
When the destination is an existing directory, mv moves into it. When b does not exist, mv a b is a rename. That pair is the whole trap (objective 6).
When the destination is an existing directory, mv moves into it. When b does not exist, mv a b is a rename. That pair is the whole trap (objective 6).