🔥 3-day streak
CompTIA Linux+ (XK0-006)24 / 123
Question 24 of 123

A backup script creates a temporary working directory with mktemp -d and stores its path in the variable WORKDIR. The script may exit at several points due to errors, and each early exit currently leaves behind orphaned temp directories in /tmp. You must guarantee the temp directory is removed whenever the script terminates, regardless of how it exits. Which line should you add near the top of the script?

Reviewed for accuracy · Report an issueNext question