Learn Command Line


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are asking about.>
https://www.codecademy.com/courses/learn-the-command-line/lessons/navigation/exercises/mkdir?action=lesson_resume

<Below this line, describe in what way does your code behave incorrectly? Include ALL error messages.>

May I please get some help with this one?

I’m following the prompts and am getting error messages. I don’t understand why I can’t move through this one. How do you navigate to the 2014/dec/ directory? cd …/…/2014/dec?

<Below this line, add a screenshot of your whole web browser so that we can see what you see.>


#2

You’ve navigated to / and moved yourself out of your workspace directory. That’s why it’s not working for you.

Walking through your commands

Let’s walk through the stuff that you were typing

cd jan/memory
Changed directories

pwd
Showed you where you currently are in the filesystem.

cd
That took you to your home directory which is home/ccuser

pwd
Showed you that you are in home/ccuser

cd ..
You moved back one folder into the home directory. Before you were in the home/ccuser, but now you are in the home directory.

pwd
Shows you that you are in home.

cd ../feb
That gave you a No such file or directory error. Why?

You are in home. .. would take you to the root. There is no feb folder there. You could do a ls to inspect the available files and directories.

The feb directory exists in home/ccuser/workspace/blog/2015. Right now you are in home. Look at the path/to that I gate. home is the first directory. Therefore, you’d have to do cd ccuser/workspace/blog/2015 to get back to where you want to be.

cd ..2015/feb/
That gave you a No such file or directory error. Why? Look at what I told you above. You are in the home directory.

cd ..
Now you moved yourself to /.

ls
Listing out the files and folders, notice that you are no longer in your home directory.

ls
Same as above

touch keyboears.txt
You got a Permission denied error because you do not have permission to work in that directory.

What do you need to do?

You need to get back into your workspace and into the 2014/dec directory.

Type this: cd ~/workspace/blog/2014/dec.

Now you do step 2 in the instructions. Make sure you spell the filename correctly.


#3

Thank you! I’m still confused but got through the lesson. I think I’ll reset it and have another go from the beginning.


#4

That’s an excellent idea. And then when you get stuck or aren’t quite sure why it’s doing something, stop and think about it. Check where you are in the filesystem as compared to where the lesson wants you to be. If still fuzzy, come here and we’ll help you out.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.