LAB5-CP4-Q1
grep flags
Checkpoint 4: grep Basics
5 pts
grep -i, grep -n, grep -v, grep -c, grep -r on a log file.
Exam questions that reference this lab question
- CSCD240-E1-A-Q13 directly_tests Somewhere in the filesystem there is a file config.ini. Locate it.
- CSCD240-E1-A-Q14 directly_tests Show the filenames containing "printf" in all .c files in home directory and subdirs.
- CSCD240-E1-A-Q34 directly_tests Print lines of access.log containing 403 with their line numbers.
- CSCD240-E1-B-Q14 directly_tests Find every world-writable regular file under /var (common misconfig indicator).
- CSCD240-E1-B-Q18 directly_tests Print every line of auth.log containing "Failed password" (case-insensitive), with line numbers.
- CSCD240-E1-C-Q17 directly_tests Which command searches the filesystem for a file by name, suppressing permission-denied errors?