easyMultiple ChoiceObjective-mapped
XK0-006 Practice Question: Which command is used to convert a file to…
Which command is used to convert a file to uppercase?
⚠ Common exam trap
CompTIA often tests the candidate's ability to recognize that multiple valid syntaxes exist for the same `tr` operation, leading them to pick a single option when 'All of the above' is the comprehensive correct answer.
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
✓
All of the above
All three commands (A, C, D) are valid ways to convert lowercase letters to uppercase using the `tr` command. Each uses a different syntax—character ranges, POSIX character classes, or bracket expressions—but all achieve the same result. The question asks which command is used, and since all options work, 'All of the above' is the correct answer.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
tr '[a-z]' '[A-Z]'
Why it's wrong here
This is valid as well, but not the sole correct answer.
- ✓
All of the above
Why this is correct
All three options correctly convert lowercase to uppercase using tr.
- ✗
tr [:lower:] [:upper:]
Why it's wrong here
This is also valid, but there are other options.
- ✗
tr a-z A-Z
Why it's wrong here
This is a valid syntax, but not the only one.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.