FAQ: Manipulation - ls -l

#1

This community-built FAQ covers the “ls -l” exercise from the lesson “Manipulation”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Learn the Command Line

FAQs on the exercise ls -l

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

#2

I am failing to get the green check mark to continue to step 2. When asked to navigate to the comedy/ directory, I’m entering cd /home/ccuser/workspace/movies/comedy

I think this is correct, but not getting the green check mark.

1 Like
#3

the exercise won’t approve of using absolute path, you will have to use the relative path from the right working directory

1 Like
#4

*** UPDATE *** I have since worked this out, I understand what stetim94 is referring too now they command required is simply ‘cd comedy’ as this moves from movies to comedy ‘relatively’ rather than completely changing file destination ( albeit that’s my understanding, hope this helps someone else )

I am having the same problem, i have tried several methods of cd,

i have tried also cd ./comedy
and when checking i am in the correct folder using pwd i am there but the task will not provide me with the green tick to move on

2 Likes
#5

cd comedy actually just worked for me.

2 Likes
#6

I’ve had the same problem. Wrote cd ./comedy/ and didn’t get the green tick. However, tried as you suggested cd comedy only, and the problem was solved. Thank you!

1 Like
#7

I’m having an issue with the same thing. I tried all possible ways 10 times each and nothing works…

#8

Hello CC Moderator,

Can you please explain what “Hard Links” number actually includes per reading in this Lesson?

Lesson says the following:

Number of hard links. This number counts the number of child directories and files. This number includes the parent directory link ( .. ) and current directory link ( . ).

However, if we follow what the actual filesystem tree contains, it will be different from what terminal produces: (this picture was presented in the beginning of the lesson -

  • per filesystem tree, while in movies directory:
  • action should contain total of 4 child items, which coincides with terminal: scifi, superhero, superman.txt, wonderwoman.txt;
  • comedy should contain 2 child items, slapstick, satire, but terminal says that is has 4;
  • similarly, drama should contain 2 child items, biopic, historical, but terminal says 4 again:
    45%20PM

I have found similar inconsistencies between numbers-logic when going into child directories and printing ls -l command.
Thank you for your time and clarification!

#9

Directories can never be hard links, and none of the other files you mentioned are hard links, they are just files

understanding what hard links are is quite useful:

https://medium.com/@wendymayorgasegura/what-is-the-difference-between-a-hard-link-and-a-symbolic-link-8c0493041b62

anyway, in action directory are two hard links: current directory (.) and parent directory (..), then scifi and superhero each also have a hard link to parent directory (..), this way, you have 4

1 Like