Quiz — Pipes & Search
Quiz on pipes, redirection, grep, find, and log analysis
Pipes & Search — apply the analyst toolkit
Ten APPLY questions on stdin/stdout/stderr, | > >> 2>, grep flags, head/tail/wc, find, PATH, and log hunts. Think like someone who must not destroy the only copy of a log. Next up: processes, packages, and bash.
APPLY: echo hello > notes.txt on a file that already held a paragraph. What is true?
APPLY: Why is cat huge.log | grep "Failed password" | wc -l a better first move than opening huge.log in an editor?
APPLY: You need case-insensitive matches with line numbers for fail or error. Which grep shape is closest?
APPLY: tail -f auth.log is best used when:
APPLY: find "$HOME/cyberlium-lab" -type f -name "*.log" -mtime -1 returns files that are:
APPLY: command 2> errors.txt redirects which stream?
APPLY: True or False: grep "Failed password" auth.log > auth.log is a safe way to keep only failures in the same file.
APPLY: Which habits protect you when hunting logs and binaries? (Select 2)
APPLY: locate is fast but find is often more trustworthy for a file you just created because:
APPLY: After pipes and search, the next Linux Fundamentals module starts with: