10.4k views
2 votes
Write an Unix shell script that does the following: o Creates a directory, projectFiles Creates 3 additional directories (as subdirectories of projectFiles): source, data, and results. Submit a single text file containing your shell commands

1 Answer

6 votes

Answer:

mkdir -p /path/{projectFiles/{source, data, results}}

Step-by-step explanation:

  • mkdir is the command for creating directory in unix shell
  • -p is used for creating several subdirectories at the same time
  • /path/ after, the path is given for the directory projectFiles
  • {projectFiles/{source, data, results}} is followed after the path as the directory and subdirectories to be created in curly brackets.
User Dracarys
by
8.3k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.