Missão 85DeepSearcher
+210 XP
Advanced find by Size, Time & Exec (-size, -mtime, -exec)
Iniciar terminal interativo para esta missão→Sem instalação necessária • Executado no navegador
Conceito e visão geral
Beyond basic filename queries, find is a powerhouse filter engine for automated system cleanup and log rotation:
- -size +50M: Filters for files strictly larger than 50 Megabytes (+ for greater than, - for less than).
- -mtime -7: Filters for files modified within the last 7 days.
- -exec : Passes all matched files directly into a command in batches, replacing {} with matched file paths.
Combining these allows single-line system maintenance, such as finding and purging runaway logs: find /var/log -size +50M -exec rm {} +.
Instruções da missão
Find large log files modified recently using
find /var/log -size +50M -mtime -7, then delete the oversized crash dump using find /var/log -size +50M -exec rm {} +.Referência de sintaxe de comandos
| Command / Syntax | Description |
|---|---|
find /var/log -size +50M -mtime -7 | Find files larger than 50MB modified within 7 days |
find /var/log -size +50M -exec rm {} + | Find and automatically remove files larger than 50MB |
Objetivos de verificação
- ○Filter files by size and modification time with find
- ○Delete oversized log using find -exec rm