nerdexam
GIAC

GSEC · Question #329

Analyze the file below. When will the program /home/sink/utils/remove temp hies.py run?

The correct answer is D. At the time specified in the crontab file. The program is scheduled by a crontab file, which defines exact date and time patterns for automated execution by the cron daemon.

Linux and Cryptography

Question

Analyze the file below. When will the program /home/sink/utils/remove temp hies.py run?

Exhibit

GSEC question #329 exhibit

Options

  • AWhen a user requests it by connecting to the listening port
  • BWhen the user 'sink' logs in
  • CAt startup when the system enters the multi-user runlevel
  • DAt the time specified in the crontab file

How the community answered

(41 responses)
  • A
    17% (7)
  • B
    7% (3)
  • C
    5% (2)
  • D
    71% (29)

Why each option

The program is scheduled by a crontab file, which defines exact date and time patterns for automated execution by the cron daemon.

AWhen a user requests it by connecting to the listening port

A program that runs when a client connects to a listening port is managed by a service daemon such as inetd or xinetd, not cron.

BWhen the user 'sink' logs in

Scripts that execute when a specific user logs in are placed in login initialization files like ~/.bash_profile or ~/.profile, not crontab.

CAt startup when the system enters the multi-user runlevel

Programs that run at multi-user runlevel startup are configured as systemd unit files or SysV init scripts in /etc/init.d, not cron jobs.

DAt the time specified in the crontab fileCorrect

Crontab is the Linux/Unix time-based job scheduler. The referenced file contains cron syntax specifying when the script should run - the cron daemon reads this file and triggers the program at the defined time expression (minute, hour, day, month, weekday fields), making scheduled time the determining factor for execution.

Concept tested: Linux cron job scheduling and crontab syntax

Source: https://man7.org/linux/man-pages/man5/crontab.5.html

Topics

#crontab#Linux scheduling#cron jobs#task automation

Community Discussion

No community discussion yet for this question.

Full GSEC Practice