← All RHCE Flashcard Decks

Scripting and Task Scheduling Flashcards

6 cards from real RHCE practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 Scripting and Task Scheduling flashcards as text
  1. Which shebang line is correct for a bash script on RHEL?

    Answer: #!/bin/bash

    `#!/bin/bash` is the correct shebang that tells the kernel to use `/bin/bash` as the interpreter for the script.

  2. What does the `$?` variable represent in a bash script?

    Answer: Exit code of the last command

    `$?` holds the exit status of the most recently executed foreground command (0 = success, non-zero = failure).

  3. Which `cron` field position represents 'day of the week'?

    Answer: 5th field

    In cron syntax, the fields are: minute, hour, day-of-month, month, day-of-week — making day-of-week the 5th field.

  4. What command lists all cron jobs for the current user?

    Answer: crontab -l

    `crontab -l` lists (displays) the current user's crontab without editing it.

  5. Which special cron string runs a job every day at midnight?

    Answer: All of the above

    `@midnight`, `@daily`, and `0 0 * * *` are all valid cron expressions that schedule a job to run at midnight every day.

  6. What is the purpose of `systemd.timer` units in RHEL?

    Answer: Schedule tasks as a modern cron replacement using systemd

    Systemd timer units provide a modern alternative to cron for scheduling tasks, with better integration into systemd logging and dependency management.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. redhat.com — Test delivery, renewal, score validity, exam format, score release · verified Oct 2026