File Photos Into Year/Month Folders
A phone backup dumped thousands of files into /home/student/photos/inbox/. Camera files are named like IMG_20260714_183205.jpg or VID_20251231_235959.mp4 (date YYYYMMDD, then time).
Write /home/student/bin/sort-photos.sh SRC DEST that moves every file in SRC (not in sub-folders) whose name matches IMG_YYYYMMDD_HHMMSS.<ext> or VID_YYYYMMDD_HHMMSS.<ext> into DEST/YYYY/MM/, creating folders as needed. Then run it on /home/student/photos/inbox with DEST /home/student/photos/library.
-1 before the extension (IMG_…-1.jpg), or -2, and so on.<old path> -> <new path>.About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.