Which command option is used to retrieve the week number?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The option that retrieves the week number of the year is indeed the one that corresponds to the ISO 8601 week number format. In this context, the correct choice refers specifically to +%V. This format provides the week number according to the ISO standard, where the first week of the year is defined as the week containing the first Thursday of the year. Thus, it is a widely accepted method for calculating week numbers.

To deepen your understanding, it’s helpful to know how the other options function:

  • The option that represents +%j returns the day of the year, which ranges from 001 to 366.
  • The option that indicates +%W gives the week number of the year, but it starts counting weeks based on the Monday of the week, which may not align with ISO standards, as it can return a different week number for the same date.
  • The option +%D is used to format the date as mm/dd/yy, which does not relate to week numbers at all.

Understanding these distinctions clarifies why +%V is the appropriate choice for retrieving the week number as defined by ISO standards.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy