Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question

What do the linux command below do ?

$ mkdir -p mydir2/mysubdir2/threedirsdeep

Answer

When given the option -p , then mkdir will create parent directories as needed.

paul@debian8:~$ mkdir -p mydir2/mysubdir2/threedirsdeep
paul@debian8:~$ cd mydir2 paul@debian8:~/mydir2$ ls -l total 4
drwxr-xr-x 3 paul paul 4096 Sep 17 00:11 mysubdir2

paul@debian8:~/mydir2$ cd mysubdir2
paul@debian8:~/mydir2/mysubdir2$ ls -l total 4
drwxr-xr-x 2 paul paul 4096 Sep 17 00:11 threedirsdeep

paul@debian8:~/mydir2/mysubdir2$ cd threedirsdeep/
paul@debian8:~/mydir2/mysubdir2/threedirsdeep$ pwd /home/paul/mydir2/mysubdir2/threedirsdeep

Question

What do the linux command below do ?

$ mkdir -p mydir2/mysubdir2/threedirsdeep

Answer
?

Question

What do the linux command below do ?

$ mkdir -p mydir2/mysubdir2/threedirsdeep

Answer

When given the option -p , then mkdir will create parent directories as needed.

paul@debian8:~$ mkdir -p mydir2/mysubdir2/threedirsdeep
paul@debian8:~$ cd mydir2 paul@debian8:~/mydir2$ ls -l total 4
drwxr-xr-x 3 paul paul 4096 Sep 17 00:11 mysubdir2

paul@debian8:~/mydir2$ cd mysubdir2
paul@debian8:~/mydir2/mysubdir2$ ls -l total 4
drwxr-xr-x 2 paul paul 4096 Sep 17 00:11 threedirsdeep

paul@debian8:~/mydir2/mysubdir2$ cd threedirsdeep/
paul@debian8:~/mydir2/mysubdir2/threedirsdeep$ pwd /home/paul/mydir2/mysubdir2/threedirsdeep
If you want to change selection, open document below and click on "Move attachment"

Chapter 8. working with directories
rent directory of threedirsdeep does not exist. paul@debian8:~$ mkdir mydir2/mysubdir2/threedirsdeep mkdir: cannot create directory ‘mydir2/mysubdir2/threedirsdeep’: No such fi\ le or directory <span>When given the option -p, then mkdir will create parent directories as needed. paul@debian8:~$ mkdir -p mydir2/mysubdir2/threedirsdeep paul@debian8:~$ cd mydir2 paul@debian8:~/mydir2$ ls -l total 4 drwxr-xr-x 3 paul paul 4096 Sep 17 00:11 mysubdir2 paul@debian8:~/mydir2$ cd mysubdir2 paul@debian8:~/mydir2/mysubdir2$ ls -l total 4 drwxr-xr-x 2 paul paul 4096 Sep 17 00:11 threedirsdeep paul@debian8:~/mydir2/mysubdir2$ cd threedirsdeep/ paul@debian8:~/mydir2/mysubdir2/threedirsdeep$ pwd /home/paul/mydir2/mysubdir2/threedirsdeep rmdir When a directory is empty, you can use rmdir to remove the directory. paul@debian8:~/mydir$ ls -l total 8 drwxr-xr-x 2 paul paul 4096 Sep 17 00:08 otherstuff drwxr-xr-x 2 paul pau

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.