Problem with a command line crash course exercise 8

Hello everybody!

I started doing the command line crash course yesterday but I faced a problem in exercise 8 where I wasn’t able to make a new directory i/like/icecream. I have checked that there wasn’t any errors but I still get a message that says: No such file or directory. I think this is kind of weird because I am trying to make a new directory so why the error message says that I should have that named directory already?

I hope someone can help me with this issue.

Best way to help you is: first: say what operating system you use, second: tell us what command you used to make directory example - mkdir -p i/like/icecream. Seems to work OK on Linux. Tell us if you continue to have trouble. :slight_smile:

Just thought I’d i might add, Zed uses window powershell as a example, if that doesn’t work, try it in Click Start, Type cmd and press ENTER then type the mkdir again.

I prefer cmd in windows but there are somethings you can only do in powershell.

Hi and thanks for your response!

I use macOS and first I used command cd temp and then mkdir i/like/icecream. So exactly how it is suppose to do. After that I tried to use mkdir -p i/like/icecream. This worked but I am still curious why it doesn’t work the way it should. Maybe you can tell me?

Remember that you have to type these two commands constantly:


Always type those. Every cd, every cp, after every command and before it obsessively type those two commands. Once you do you’ll see why it’s not working like you think.

mac OS

mkdir i/like/icecream doesn’t work (in the book p311)
mkdir -p i/like/icecream work

why ?

Because mac OS is a Unix operating system, and the mkdir command will only make 1 directory unless you tell it to make an entire path with -p. Type:

man mkdir

To see what it says.