CompTIA Linux+ (XK0-004) — Question 308
A Linux administrator needs to schedule a cron job to run at 1:15 p.m. every Friday to report the amount of free disk space on the system and to send the output to a file named `freespace`. Which of the following would meet this requirement?
Answer options
- A. 13 15 * * 5 df > /freespace
- B. 15 13 * * 5 df > /freespace
- C. 15 1 * * 6 df > /freespace
- D. 15 13 6 * * df > /freespace
Correct answer: B
Explanation
The correct answer is B, as it specifies the time as 15 minutes past 13 hours on Fridays, which is 1:15 PM. Option A incorrectly lists the hours in 24-hour format, making it 3:15 PM. Option C sets the job for 1:15 PM on Saturdays instead of Fridays, and option D incorrectly specifies a day of the month instead of the day of the week.