Help with Command line


#1

Hello, I'm Priscilla. New around here but I found Html and css quite easy to follow through. However I have been stuck with command line and would appreciate your help.
Havent been able to move past the third page of the first lesson in command line.
I'm stuck here

"Let's try out another option for the ls command.

Navigate to the comedy/ directory."

Please I will appreciate any help with this. Thank you.
below is a link
https://www.codecademy.com/courses/learn-the-command-line/lessons/manipulation/exercises/ls-l?action=lesson_resume


#2

Did you follow the steps thoroughly?

1)
Let's try out another option for the ls command.
Navigate to the comedy/ directory.
--> First, 'pwd', to make sure that you are on the 'movie' directory. Then 'cd comedy'
2.
Then type
--> ls -alt


#3

Thank you John.
This was helpful, but I didnt see this format in the tutorial.
Is there a technique for understanding the command line?
Your response was able to move me to the next assignment but then I'm also stuck again.
The command line isnt as easy as the html and css.

This is the next assignment

Let's move on to copying, moving, and removing files and directories from the command line.

Navigate to the drama/biopic/ directory.

cd ../drama/biopic/

List all files and directories in the working directory.

I tried using ls -alt, it didnt work
then i did 'cd drama' it didnt work. Tried 'cd drama/biopic'

Didnt work either.
Can you please assist me with this?

Thanks


#4

Please I will need help with this yet to get any response and it's leaving me stuck. Been able to make progress with the GIT and other course but really stuck with the command line.


#5

Please I will need help with this yet to get any response and it's leaving me stuck. Been able to make progress with the GIT and other course but really stuck with the command line. Thanks


#6

Whenever I use command line, I always use 'pwd' (which prints the working directory, i.e. informing me which file directory I am currently at). To get to the drama directory, you must first make sure that your current directory is at 'movies'.( If not, using 'cd ../' will revert you one directory(cd ../../ for reversing to two directories, and repeat the pattern for reversing further); until you are on the right directory.
When the result of your 'pwd' is '/home/ccuser/workspace/movies', then you know you're on the right directory(I mention this because changing directories ('cd') to a file while you are two or more files behind will result in an error. For example. typing cd biopic while you are in the workspace directory will result in an error)).
Then use 'ls'. This should print out 4 different directories and 1 text file. One of which is 'drama'.
Change directory to drama -> 'cd drama'.
Then press 'ls'. You should see two directories: 'biopic' and 'historical'
Change directories to biopic -> 'cd biopic'. Then press 'ls -alt' OR 'ls' (whichever allows you to pass(I've used 'ls' and it let me through)).
The next step is to type this: 'cp frida.txt lincoln.txt'
This copies the frida.txt and Lincoln.txt to be placed in a different location as the instructions later shows.

Let me know if you have more questions.


#7

So I've gone back and re-started the course page and there was some weird bug. If the instructions I've given you earlier does not work, then try this out.
From the very beginning, simply press 'cd ../drama/biopic/'.
Remember when I mentioned to make sure that you are on the right directory before changing directories?(since you must append to a directory in a chain-like structure) Well I deliberately started at the biopic directory, and typed 'cd ../drama/biopic' as the instruction stated and it let me pass.
This shouldn't have because my current directory was '/home/ccuser/workspace/movies/drama/biopic'. Pressing 'cd ../drama/biopic' is an incorrect input because doing so already places me again in the drama directory. The result did showed an error, but it did allow me to move on.
Basically, just press 'cd ../drama/biopic/' in the very first line and it should let you pass. However, I hope you understand why it shouldn't have.


#8

In terms of technique, command line is just a tree with many branches of directories and files. Picture an ascending and descending hierarchy of data. In able to move from one file to the next, you cannot skip a branch, therefore, you must append to the next directory until you reach the right file location. And I disagree, command line is much easier than html and css. I think you may be experiencing some bugs within the course itself as I mentioned in the previous post.


#9

Thanks John, That was helpful, but I'm stuck again. This command line really gives me a lot of headache.
This instruction
List all files and directories in the working directory. You should see the file batman.txt has been renamed as spiderman.txt.

Click Next to learn how these commands work.

I've tried all types of command but nothing is working. I tried cd ../
cp *
and included others, but it's not moving


#10

Sorry John.
That I keep disturbing you is just that I have encountered a lot of problem with the command line and it's leaving me frustrated. Is there a different way of using the command line to navigate directory?


#11

Did you try the steps I mentioned? And what exactly are you having trouble with?
No need to apologize.


#12

Can you send me a link?


#13

Did you first navigate to the superhero/ directory? -> 'cd superhero' before listing all the files?


#14

Sorry, I couldnt reply yesterday as my internet tripped of.
Yes, I have listed that. I'm on the final request on page 7 out of 10. Which is the 8th question stating 'List all files and directories in the working directory. You should see the file batman.txt has been renamed as spiderman.txt.'

When i couldnt make progrss with it, I went to the Deploy a website coding and got stuck at 'To view your site locally, you must first navigate to your site's directory, using the cd command.

Navigate to your site's directory using the cd command.'

I believe they are both similar.

I look forward to your response.


#15

Hi John,

Sorry to disturb. Did you get my last message on what the question is?


#16

Hi John,

Hope yOu aren't tired of me. I havent gotten any response from you concerning my request on the command line. And I've been stuck since


#17

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