nerdexam
CompTIA

XK0-005 · Question #773

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?

The correct answer is B. echo < /home/admin/script.sh | at 9pm March 31. The at command is used to schedule a task to run once at a specific time. The typical format for running a script with at includes specifying the time and date, and using -f to indicate a file to Command echo < /home/admin/script.sh | at 9pm March 31 schedules the execution of…

System Management

Question

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?

Options

  • Aat -f /home/admin/script.sh 9pm March 31
  • Becho < /home/admin/script.sh | at 9pm March 31
  • Cat 9pm March 31 | echo > /home/admin/script.sh
  • Dat 9pm March 31 -f /home/admin/script.sh

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    72% (18)
  • C
    16% (4)
  • D
    4% (1)

Explanation

The at command is used to schedule a task to run once at a specific time. The typical format for running a script with at includes specifying the time and date, and using -f to indicate a file to Command echo < /home/admin/script.sh | at 9pm March 31 schedules the execution of /home/admin/script.sh at 9:00 p.m. on March 31.

Topics

#at command#job scheduling#script execution#task automation

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice