Exam EX200 All QuestionsBrowse all questions from this exam
Question 99

SIMULATION -

Set cronjob for user natasha to do /bin/echo hiya at 14:23.

    Correct Answer:

    To set a cron job for the user 'natasha' to execute /bin/echo hiya at 14:23, the following steps should be performed: 1. Open the cron jobs for the user 'natasha' by running the command 'crontab -e -u natasha'. 2. Add the line '23 14 * * * /bin/echo hiya' to specify the job schedule (which means at 14:23 every day). 3. Save and exit the editor, typically using ':wq' in vi or ':wq!' if you encounter permission issues. To verify, you can list the cron jobs for 'natasha' by running 'crontab -l -u natasha'. Hence the correct answer would be: # crontab -e -u natasha 23 14 * * * /bin/echo hiya :wq. The 'crontab -e -u natasha' opens the crontab editor for natasha, the '23 14 * * * /bin/echo hiya' specifies the time and command, and ':wq' saves and exits the editor.

Discussion
STFN2019

crontab -u natasha -e INSERT: 23 14 * * * /bin/echo hiya crontab -u natasha -l (verify)

PENNSHARK

Set cronjob for user natasha to do /bin/echo hiya at 14:23. vi /etc/crontab (copy the crontab to natasha) crontab -u natasha -e 23 14 * * * /bin/echo “hiya” :wq crontab -u natasha -l