nerdexam
Cisco

200-901 · Question #368

Refer to the exhibit. Which code snippet represents the sequence? A. B. C. D.

The correct answer is A. A directory called PRODUCTION is created. C. A YAML file is created. The code sequence performs two filesystem operations: creating a directory named PRODUCTION and creating a YAML file.

Infrastructure and Automation

Question

Refer to the exhibit. Which code snippet represents the sequence? A. B. C. D.

Exhibits

200-901 question #368 exhibit 1
200-901 question #368 exhibit 2
200-901 question #368 exhibit 3
200-901 question #368 exhibit 4
200-901 question #368 exhibit 5

Options

  • AA directory called PRODUCTION is created.
  • BThe engineer changes to the parent directory.
  • CA YAML file is created.
  • DA YAML file is removed.
  • EA directory called state.yml is created.

How the community answered

(50 responses)
  • A
    82% (41)
  • B
    6% (3)
  • D
    2% (1)
  • E
    10% (5)

Why each option

The code sequence performs two filesystem operations: creating a directory named PRODUCTION and creating a YAML file.

AA directory called PRODUCTION is created.Correct

Creating a directory named PRODUCTION (via mkdir PRODUCTION or equivalent) is a standard shell filesystem operation that matches the first step shown in the code sequence.

BThe engineer changes to the parent directory.

Changing to the parent directory (cd ..) is a navigation operation not represented as any step in the code sequence shown in the exhibit.

CA YAML file is created.Correct

Creating a YAML file (e.g., touch state.yml or redirecting content to a .yml path) matches the second step in the sequence and is consistent with infrastructure-as-code automation workflows.

DA YAML file is removed.

Removing a YAML file is a deletion operation (rm), which is the opposite of creation and does not appear anywhere in the described sequence.

EA directory called state.yml is created.

state.yml has a .yml extension indicating it is a file, not a directory; the sequence does not create a directory with that name.

Concept tested: Linux shell filesystem operations in automation scripts

Source: https://linux.die.net/man/1/mkdir

Topics

#Automation Scripting#Programming Logic#Workflow Implementation

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice