On a Linux database host, nightly dump files must be compressed, files older than 14 days must be deleted, and the job must run from cron. Which scripting option is the most direct fit?
Select an answer to reveal the explanation.
Short Explanation
On Linux, file chores like compressing and pruning are what the shell was born for. A few lines with gzip and find, kicked off by cron, and you're done. The trap is trying to do OS housekeeping from inside the database or from a web page.
Full Explanation
A Unix shell script is the native way to automate operating system tasks on a Linux host. Standard utilities already cover each requirement: gzip compresses the new dump files, find locates files older than a given age and removes them, and cron runs the script on a schedule without anyone logged in. Because the work is entirely file management on the host, the shell is the most direct tool, with no extra runtime or database access required. A PowerShell script that reads the Windows event log targets a different operating system's facilities; Linux does not have a Windows event log, and the task concerns files, not logged events. A client-side script in a web application runs in users' browsers, has no access to the server's file system, and would run only when someone opens the page. A stored procedure runs inside the database engine and is meant for data operations; manipulating operating system files from within the database typically requires special extensions or elevated privileges and widens the attack surface for no benefit. Exam caveat: the retention period here is the scenario's requirement, not a standard, and deleting dumps must align with the organization's backup retention policy. Operational check: run the script once manually against a test directory containing files of different ages, confirm only files older than 14 days were removed and new dumps were compressed, then check the cron log after the first scheduled run.