Signal9Signal9 — home
online
back to labs

tar: Compressed Backup With the Right Compressor and an Exclude

EasyCommand Line Essentials10-20 min
The brief

Back up a project tree into a compressed tar archive — but skip the build/log noise. Your assignment is in /root/case/assignment.env (PROJECT_DIR, ARCHIVE, COMPRESSOR, EXCLUDE_DIR).

Create ARCHIVE as a tar of PROJECT_DIR's contents, compressed with the assigned COMPRESSOR, leaving the EXCLUDE_DIR/ subtree out. Store paths relative to the project root — the archive should hold src/…, config/…, not /root/case/project/….

Grading inspects the archive itself — the compression format, the files it contains, and that nothing under EXCLUDE_DIR/ made it in. See /root/case/brief.txt.

What you'll do
  • Create a tar archive with the assigned compressor
  • Archive the project's real files with relative paths
  • Exclude the noise directory from the archive
  • Know which tar flag maps to which compressor

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