Question 350 of 527
Essential ToolseasyMultiple SelectObjective-mapped

Quick Answer

The answer is the `date` command with the format string `'+%Y-%m-%d %H:%M:%S'`, which directly outputs the current date and time in the exact YYYY-MM-DD HH:MM:SS format requested. This works because the `date` utility interprets `%Y`, `%m`, `%d`, `%H`, `%M`, and `%S` as specifiers for the four-digit year, zero-padded month, day, hour, minute, and second, giving you precise control over the output without relying on locale settings. On the Red Hat Certified System Administrator EX200 exam, this tests your ability to manipulate system time output using standard command-line tools, a common task in scripting and log management. A frequent trap is confusing the `-Iseconds` option, which produces ISO 8601 output with a timezone offset (e.g., `2023-10-05T14:30:00+05:00`), with the plain format string; the exam expects you to know that `-Iseconds` does not match the simple space-separated format. Remember the mnemonic: "Yankee Mike Delta" for the three date specifiers, then "Hotel Mike Sierra" for the time components.

EX200 Essential Tools Practice Question

This EX200 practice question tests your understanding of essential tools. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which TWO commands can be used to display the current date and time in a format like '2023-10-05 14:30:00'?

Question 1easymulti select
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

date '+%Y-%m-%d %H:%M:%S'

Option A is correct because the `date` command with the format string `'+%Y-%m-%d %H:%M:%S'` explicitly outputs the current date and time in the requested 'YYYY-MM-DD HH:MM:SS' format. The `%Y`, `%m`, `%d`, `%H`, `%M`, and `%S` specifiers correspond to the year, month, day, hour, minute, and second respectively, giving precise control over the output.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • date '+%Y-%m-%d %H:%M:%S'

    Why this is correct

    Formats date as required.

    Related concept

    Read the scenario before looking for a memorised answer.

  • cal

    Why it's wrong here

    Shows calendar, not current date/time.

  • timedatectl

    Why it's wrong here

    Shows time and date but not in that exact format.

  • date -Iseconds

    Why this is correct

    ISO 8601 format includes seconds.

    Related concept

    Read the scenario before looking for a memorised answer.

  • hwclock

    Why it's wrong here

    Displays hardware clock, not current date/time.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Red Hat often tests the distinction between commands that display time in a raw format versus those that require explicit formatting; candidates may mistakenly choose `timedatectl` because it shows the current time, but it does not output in the exact 'YYYY-MM-DD HH:MM:SS' format without additional parsing.

Trap categories for this question

  • Command / output trap

    Shows calendar, not current date/time.

Detailed technical explanation

How to think about this question

The `date` command uses `strftime`-style format specifiers, where `%Y` yields a four-digit year (e.g., 2023), `%m` zero-pads the month (01–12), and `%d` zero-pads the day (01–31). The `-Iseconds` option (ISO 8601 with seconds) outputs the date and time in the format '2023-10-05T14:30:00+00:00' (with time zone offset), which, when truncated or viewed without the time zone, matches the requested pattern. Under the hood, `date` reads the system clock via the `clock_gettime` syscall, while `hwclock` interacts directly with the CMOS RTC, which may differ from the system time if NTP adjustments are pending.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the EX200 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related EX200 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free EX200 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this EX200 question test?

Essential Tools — This question tests Essential Tools — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: date '+%Y-%m-%d %H:%M:%S' — Option A is correct because the `date` command with the format string `'+%Y-%m-%d %H:%M:%S'` explicitly outputs the current date and time in the requested 'YYYY-MM-DD HH:MM:SS' format. The `%Y`, `%m`, `%d`, `%H`, `%M`, and `%S` specifiers correspond to the year, month, day, hour, minute, and second respectively, giving precise control over the output.

What should I do if I get this EX200 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.