Signal9Signal9 — home
online
back to labs

Wildcard Wrangler: Sort the Mailroom

EasyLinux Fundamentals15-20 min
The brief

The mailroom at /root/mailroom/inbox is a mess: four .log files, two .conf files, a handful of text notes, and one troublemaker named changelog.txt that LOOKS loggish but isn't one. Sort it with wildcards: MOVE all four .log files into the logs/ directory (they leave the inbox), COPY both .conf files into backup/ (originals stay put — copies are insurance), and RENAME todo.txt to done.txt right where it is. The trap to dodge: changelog.txt must not move anywhere — *.log matches names ENDING in .log, and changelog.txt doesn't, but only if your pattern is precise. Preview every glob with ls before you pull the trigger.

What you'll do
  • Move all *.log files from inbox/ to logs/ (none left behind, changelog.txt untouched)
  • Copy both *.conf files to backup/ — originals must remain in inbox/
  • Rename inbox/todo.txt to inbox/done.txt

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.