Project: Mission Control
Congratulations, cadet. You have learned navigation, file management, searching, pipelines, text processing, permissions, and system tools. Now it is time to prove yourself.
The station's Mission Control directory is a mess. A previous officer left files scattered across the wrong folders, permissions broken, and no summary report. Your commanding officer needs the directory organized and a final report generated before the next shift starts.
Mission: Mission Control Overhaul
A previous shift officer left the Mission Control directory in chaos: incoming files dumped in inbox/, nothing sorted, permissions wide open, and no status report for command. The captain wants this fixed before the next crew rotation. You have the tools. Get it done.
-
Sort the inbox. Move all
.logfiles frominbox/intologs/. Move all.conffiles frominbox/intoconfig/. -
Hunt for critical issues. Use
grep -rto search the entirelogs/directory for the wordCRITICAL. Redirect the matching lines intoreports/critical-issues.txt. -
Build a configuration manifest. Use
catto combine all.conffiles inconfig/and pipe throughsortintoreports/sorted-config.txt. -
Lock down security. The file
config/security.confcontains sensitive access credentials. Set its permissions so only the owner can read and write it, no group or other access. Usechmod 600. -
File the final report. Create
reports/mission-summary.txtcontaining the current date on the first line (usedate >) and the textSTATUS: COMPLETEon the second line (useecho >>to append). -
Verify your work. Run
ls reports/to confirm all three report files are in place.
Expected result
The inbox/ should contain only old-notes.txt. The logs/ directory holds the three .log files, config/ holds the three .conf files (with security.conf locked to 600), and reports/ contains critical-issues.txt, sorted-config.txt, and mission-summary.txt. The station is counting on you, cadet.