nerdexam
CompTIA

LX0-104 · Question #71

Where are user specific crontabs stored?

The correct answer is B. As individual per-user files within /var/spool/cron.. User-specific crontab entries, which define scheduled tasks for individual users, are typically stored as separate files within the /var/spool/cron directory. Each file is named after the respective user, allowing the cron daemon to manage their scheduled jobs independently.

Administrative Tasks

Question

Where are user specific crontabs stored?

Options

  • AIn the database file /etc/crontab.db which is shared by all users.
  • BAs individual per-user files within /var/spool/cron.
  • CAs individual per-user files in /etc/cron.user.d.
  • DIn the .crontab file in the user's home directory.
  • EIn the file /var/cron/user-crontab which is shared by all users.

How the community answered

(33 responses)
  • A
    6% (2)
  • B
    88% (29)
  • C
    3% (1)
  • E
    3% (1)

Why each option

User-specific crontab entries, which define scheduled tasks for individual users, are typically stored as separate files within the /var/spool/cron directory. Each file is named after the respective user, allowing the cron daemon to manage their scheduled jobs independently.

AIn the database file /etc/crontab.db which is shared by all users.

Crontabs are not typically stored in a single shared database file like /etc/crontab.db; /etc/crontab is a system-wide crontab, but user crontabs are separate.

BAs individual per-user files within /var/spool/cron.Correct

On most Unix-like systems, user-specific crontab files are stored in /var/spool/cron (or /var/spool/cron/crontabs on some systems like Debian/Ubuntu), with each file named after the user it belongs to. The cron daemon reads these files to execute scheduled jobs for each user.

CAs individual per-user files in /etc/cron.user.d.

/etc/cron.user.d is not a standard location for user crontabs; /etc/cron.d is for system-wide crontabs managed by packages.

DIn the .crontab file in the user's home directory.

While a user might create a .crontab file in their home directory, this file is not directly read by the cron daemon; it must be installed using crontab <filename>.

EIn the file /var/cron/user-crontab which is shared by all users.

/var/cron/user-crontab is not a standard location or format for user-specific crontabs.

Concept tested: Crontab file location

Source: https://linux.die.net/man/5/crontab

Topics

#crontab storage#user cron jobs#file system hierarchy

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice