🎯 Mission Briefing: Restore From Backup
A teammate ran rm -rf in the wrong directory and the company website's source — ~/projects/website — is gone. Luckily a backup runs every night and lands in /backups. Bring the website back without overwriting anything else in your home directory.
Your objective
Find the most recent backup, look inside it before extracting, and restore only the website directory.
Toolkit
ls -lh /backups # Which backups exist, and how fresh are they?
tar -tzf /backups/FILE.tar.gz # List what's inside (nothing is extracted)
tar -tzf /backups/FILE.tar.gz | grep website # Narrow it down
tar -xzf /backups/FILE.tar.gz -C ~ projects/website # Extract just one directory into your home
ls -la ~/projects/website # Check what came back
💡 Always list an archive before extracting it, and extract only what you need — so old copies don't overwrite newer files.