exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 138 discussion

Actual exam question from CompTIA's XK0-005
Question #: 138
Topic #: 1
[All XK0-005 Questions]

A systems administrator needs to verify whether the built container has the app.go file in its root directory. Which of the following can the administrator use to verify the root directory has this file?

  • A. docker image inspect
  • B. docker container inspect
  • C. docker exec <container_name> ls
  • D. docker ps <container_name>
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linux_admin
Highly Voted 1 year, 2 months ago
Selected Answer: C
C. docker exec <container_name> ls This command runs the ls command inside the specified container and lists the contents of the current directory. The administrator can use this to verify whether the app.go file is present in the container's root directory. Option B (docker container inspect) would provide detailed information about the specified container, such as its configuration and state, but it would not show the contents of the container's file system. To view the files inside the container, the administrator should use the docker exec command to execute a shell command inside the container, such as ls to list the files in the root directory.
upvoted 5 times
...
Alizadeh
Most Recent 8 months, 3 weeks ago
Selected Answer: C
The correct answer is C. docker exec <container_name> ls.
upvoted 4 times
...
Amazing475
10 months ago
C is the correct option
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago