FAQ: Manipulation - ls -alt

This community-built FAQ covers the “ls -alt” 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 -alt

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!

Why am I not getting a time of day when using ls -l or ls -alt in Manipulation Lesson 3 and 4?

I meant ls -t, not ls -l.

I think I figure it out. The time only shows if the last change was in the present calendar year. otherwise the year of the change is shown.

On lesson 4/10 I can’t seem to progress past .1 even though I am in the drama/biopic directory. Anyone able to advise? Is it a bug or am I missing something obvious?

2 Likes

you need to run:

cd ../drama/biopic/    

from the right directory, any attempt to run anything else will not complete the exercise.

1 Like

Thank you, I must have been trying from another directory. Working now.

Sorry, what means “total 20” that appears in my working space after ls -alt command used for “comedy” directory? By the way, does it matter that the listed files in this directory in my working space and in the topic description have slightly different order? Because of time they were edited?

I’ve got about “total”, sorry!

I seem to have navigated away from the right directory so I can’t continue the lesson! - what is the name of the directory I should be in so I can navigate my way back please?

Ah. I think I’ve figure it out - or solved it!

Just type cd …/drama/biopic/ starting the exercice… then you can see the checkbox which means you did it!!! This is wrong. When you type …/ you are going up a level, and of course you can see: No such file or directory. Then you have to type: cd /drama/biopic/ . then : write ls and that it’s.

2 Likes

This lesson is really badly formulated. spent 10-15 mins figuring out that I had to come from the comedy directory. to anyone else having trouble completing this step: You have to navigate to the biopic folder directly from the comedy folder. pwd to make sure you’re in the comedy folder, then cd …/drama/biopic

In lesson 4, after I typed "cd …/drama/biopic/ "
It returns “no such file or dictionary”
What should I do? so confused

Seems you are not in the right directory to execute this command? Start with:

pwd

to see your current working directory

Thanks! I hope you include the use of “pwd” in the course.

Sometimes this course will use questions like this one:

Navigate to the drama/biopic/ directory.
cd …/drama/biopic/
List all files and directories in the working directory.

as a single task. After returning the cd …/drama/biopic/ line, the question will show an X instead of a checkmark, plus some delay.

Is there a way to run cd and ls in a single command without scripting out a function or something?
Thanks!

Doesn’t work out for me either. Quite annoying.

ok I’m in the comedy directory and it says go to drama-biopic. I type it in EXACTLY as shown. I followed the directions to the letter. Three https://www.codecademy.com/courses/learn-the-command-line/lessons/command-line-manipulation/exercises/ls-alttimes. No such directory.

Three times, that is

Yea this course is really messed up. I gave up on 4/10 and then had the same problem with 5/10.

1 Like