Exercise 3: Don't Delete Logs to Free Disk Space Mid-Incident — Possible Solution ==================================================================== WHY DELETING THE LOG FILE IS A MISTAKE ------------------------------ Per this chapter's own warning box, "clearing a log file to free up disk space during an active incident is a genuinely common, genuinely damaging mistake - it destroys the exact evidence you're trying to use to diagnose the incident, often permanently." The log file being investigated is not just disk usage to be reclaimed - it is the primary evidence for the very incident currently being worked, and deleting it removes the ability to find the actual root cause, potentially forever, since the events it recorded cannot be regenerated after the fact. WHY THIS IS ESPECIALLY BAD DURING AN ACTIVE INVESTIGATION ------------------------------ Per this chapter, this action directly conflicts with the entire log-first diagnostic approach the chapter has been building - the log file is the tool being used to move from guessing to evidence-based diagnosis, so destroying it mid-investigation forces the engineer back into guessing, with no way to recover the lost evidence afterward. WHAT TO DO INSTEAD ------------------------------ Per this chapter, "move or compress the log file instead of deleting it, and only [delete it] once you're confident you no longer need what's in it." This solves the actual disk-space problem (the file no longer occupies space on the original disk) while preserving the evidence somewhere else, so it remains available to consult until the investigation is genuinely finished. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly identifies that deleting the log destroys evidence needed for the active investigation, and correctly names the chapter's own recommended alternative - move or compress, don't delete, until the investigation is actually complete.