Which command creates the directory /var/dbfiles on the host?

Prepare for the Red Hat OpenShift Developer II DO288 Exam with our quizzes. Study with flashcards and multiple choice questions, each with hints and explanations. Get ready for your certification!

Multiple Choice

Which command creates the directory /var/dbfiles on the host?

Explanation:
To create /var/dbfiles on the host, you need root privileges to write under /var, so you use sudo. The straightforward way is to run mkdir with the exact path, which creates the directory in one step. Since /var already exists, there’s no need for the -p option. Specifying a mode with -m would set permissions at creation, which is extra detail not required for simply creating the directory. Doing an additional step to change ownership after creation is unnecessary for the act of creation itself. So using a direct mkdir call with sudo correctly creates the directory in one go.

To create /var/dbfiles on the host, you need root privileges to write under /var, so you use sudo. The straightforward way is to run mkdir with the exact path, which creates the directory in one step. Since /var already exists, there’s no need for the -p option. Specifying a mode with -m would set permissions at creation, which is extra detail not required for simply creating the directory. Doing an additional step to change ownership after creation is unnecessary for the act of creation itself. So using a direct mkdir call with sudo correctly creates the directory in one go.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy