nerdexam
CompTIA

XK0-001 · Question #54

A user creates a cron job that deletes all files in /tmp and /var/tmp on her home machine each night. However, she notices several days later that some of the files have not been deleted. What can…

The correct answer is B. Make a new crontab while logged in as root. See the full explanation below for the reasoning.

Question

A user creates a cron job that deletes all files in /tmp and /var/tmp on her home machine each night. However, she notices several days later that some of the files have not been deleted. What can she do so the cron job performs correctly?

Options

  • AWrite a shell script to remove the files.
  • BMake a new crontab while logged in as root.
  • CLog in as superuser and delete the files manually.
  • DEdit her user crontab while logged in as superuser.

How the community answered

(45 responses)
  • A
    2% (1)
  • B
    82% (37)
  • C
    9% (4)
  • D
    7% (3)

Community Discussion

No community discussion yet for this question.

Full XK0-001 Practice