37 lines
825 B
Markdown
37 lines
825 B
Markdown
---
|
|
type: challenge
|
|
title: "The Searcher"
|
|
xp: 75
|
|
duration: 30
|
|
difficulty: 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`
|