performance
medium
Apply
grep-recursive
2 points
Question 23. CSCD240-E1-B
Recursively search /etc for any file containing "password=" and print only filenames.
Work the drill
Answer on paper or in a terminal before revealing the ideal answer.
Ideal answer
grep -rl 'password=' /etc
Acceptable alternatives: ["grep -r -l 'password=' /etc", "grep -lR 'password=' /etc"]
Misconception bank
Each row below is a plausible wrong answer, the thinking that produces it, and the remedy that corrects the misconception. These are the foundation of the multiple-choice framing and the targeted feedback a student receives after answering.
grep 'password=' /etc
Misconception. Not recursive; errors on directory.
Remedy. -r or -R for recursion.
grep -r 'password=' /etc
Misconception. Prints matching LINES not filenames.
Remedy. -l for list-filenames-only.
Authority mappings
Hover any chip for the mapping justification; click to open the authority record.
KU topics:
CD-OSC-T5
NCAE errors:
SSH Login / failure: Failed to connect to host: IPSSH Login / partial: The following users failed t.SSH Login / partial: The following users failed t.
Course-artifact links
Lectures
- CSCD240-S26-L08. Pipes, filters, grep, sort, uniq, wc, tar