performance
medium
Apply
log-search
2 points
Question 18. CSCD240-E1-B
Print every line of auth.log containing "Failed password" (case-insensitive), with line numbers.
Work the drill
Answer on paper or in a terminal before revealing the ideal answer.
Ideal answer
grep -in 'Failed password' auth.log
Acceptable alternatives: ["grep -in \"Failed password\" auth.log"]
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 'Failed password' auth.log
Misconception. Missing -i and -n.
Remedy. Flag pair: -in for case-insensitive with line numbers.
grep -i 'Failed password' auth.log
Misconception. Missing -n (line numbers).
Remedy. Read requirement: "case-insensitive AND with line numbers".
Authority mappings
Hover any chip for the mapping justification; click to open the authority record.
DCWF roles:
EN-211 Forensics Analyst
DCWF tasks:
T0447
KU outcomes:
CO-M9-O1
KU topics:
CD-OSC-T5
Course-artifact links
Lectures
- CSCD240-S26-L08. Pipes, filters, grep, sort, uniq, wc, tar
Lab questions
- CSCD240-S26-LAB5: grep -i, grep -n, grep -v, grep -c, grep -r on a log file.