XK0-005 Domain 3: Scripting, Containers, and Automation

Which shell test checks file exists?

Multiple choice — select one answer

Answer choices

  1. a. $?
  2. b. Infrastructure as Code (Terraform/Ansible class)
  3. c. pyenv class tool
  4. d. [ -f file ]

Architectural breakdown & explanation

-f tests regular file existence.

Correct answer(s): d. [ -f file ]

Exam domain: Domain 3: Scripting, Containers, and Automation (29% weight on the official guide).

Official documentation & study links

Practice this certification

This page is one question from the CompTIA Linux+ bank. Run a full timed practice exam with domain-weighted random questions in your browser.