Suggested day 3020–30 minutesCaution Module milestone

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.

Outcome: You finish with proof that you can use the terminal safely and remove your practice work.

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

1

Create final project

Safe

Creates a complete mini project.

Terminal
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.sh
2

Review skills

Safe

Uses archive, find, grep, head, xargs, du, and script execution.

Terminal
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.sh
3

Remove final project only

Caution

Deletes only final_project inside the sandbox.

Terminal
cd ~/linux-practice
rm -rf final_project

Checkpoint

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?

Shortcuts:Alt + ← previous lessonAlt + → next lessonAlt + H home? focus search