Mission 5 of 5
Grand Finale and Cleanup
Build, inspect, back up, run, and safely remove a complete mini project.
Build a mini project that reviews navigation, files, scripts, archives, grep, find, permissions, and cleanup.
Mental model
Understand what is happening
A good Linux workflow creates, verifies, backs up, and then removes only intended files.
Cleanup is safe when the path is explicit and checked.
Guided lab
Work through the mission
Create final project
Creates a complete mini project.
cd ~/linux-practice
mkdir -p final_project/{src,docs,bin} backups
cd final_project
echo 'main function' > src/main.c
echo '# README' > docs/README.md
cat << 'EOF' > bin/script.sh
#!/usr/bin/env bash
echo 'Processing...'
for f in src/*; do
echo "Found: $f"
wc -l "$f"
done
EOF
chmod +x bin/script.shReview skills
Uses archive, find, grep, head, xargs, du, and script execution.
cd ~/linux-practice/final_project
tar -czvf ../backups/final-project-v1.tgz src docs bin
tar -tzf ../backups/final-project-v1.tgz
find . -name '*.sh' -exec ls -lh {} \;
grep -r 'function' .
head -2 docs/README.md
find . -type f \( -name '*.c' -o -name '*.sh' \) -print0 | xargs -0 wc -l
du -sh .
./bin/script.shRemove final project only
Deletes only final_project inside the sandbox.
cd ~/linux-practice
rm -rf final_projectCheckpoint
Verify the mission
The project passes verification and its backup survives cleanup.
Try it yourself
One step without a recipe
Complete the final mini project without following the lab line by line: build it, verify it, archive it outside the project, test the archive, remove only the project, and prove the backup survived.
Need a hint?
Before you run your final cleanup, do a dry run. Print what `rm -rf` would delete without actually deleting it. `ls -R final_project` shows you everything about to vanish. Confidence comes from verification, not hope.
Recovery
Deletes only the course sandbox if you kept all practice work inside ~/linux-practice. Optional admin actions such as apt installs are not undone by this.
Explain it back
Before you move on
- Which command created the backup?
- What should you check before running rm -rf?