CompTIA Linux+ (XK0-005) — Question 249

A Linux administrator would like to run the cleanup script /home/admin/script.sh at 9:00 p.m. on March 31. Which of the following commands should the administrator use to accomplish this task?

Answer options

Correct answer: A

Explanation

The correct command is option A, as it properly schedules the script with the 'at' command using the '-f' flag to specify the script file. Option B incorrectly uses 'echo' which does not directly execute the script, and option C attempts to use a pipe incorrectly. Option D has the correct command structure but is not the standard way to specify the file for the 'at' command.