Linux Basics

19 / 107

Create Directory - nested

We can use the -p option with the mkdir command to create a directory inside another directory.

We can create nested directories without using this option too, but suppose we want to create a directory dataset inside a directory project and if there's no directory named project, then an error will occur.

mkdir -p will create directory project instead of showing an error and if project will be present beforehand then no change will occur.

INSTRUCTIONS
  • Type cd ~ command to go to your home directory
  • Create a directory x inside directory y which is inside directory z like shown below

    z/y/x
    


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...