Files
curriculum/1.solar-system/1.welcome/08.the-searcher/index.md

825 B

type, title, xp, duration, difficulty
type title xp duration difficulty
challenge The Searcher 75 30 3

The Searcher

[INCOMING — Mission Control, Earth]

Cadet, an archive arrived. Somewhere in it, a single log file mentions the word BREACH. We need it found.

Two commands:

  • find <path> -name "<pattern>" — locate files by name
  • grep -rl "<text>" <path> — search file contents recursively, list only the matching file paths

Your script must produce two files:

  1. logs.txt — every .log file under archive/
  2. breach.txt — the path to the file containing BREACH

[END TRANSMISSION]

Your Task

In starter/starter.sh, write the two commands.

Objectives

  • logs.txt lists every .log file under archive/
  • breach.txt contains the path to the file mentioning BREACH