FAQ: Manipulation - ls & Combining Options

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

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!
You can also find further discussion and get answers to your questions over in #get-help.

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

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

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!

I just have a couple basic questions about the ls -l output and the ls -a output:

  1. Certain files have a “dr” prefix before their wrx permissions. What does the “dr” indicate?
  2. When showing hidden files, we see two files called simply “.” and “…” respectively. What are those?


(EDIT: when trying to just type two dots, the output on this comment becomes an ellipsis automatically… that second file should only be two dots, not three!)

1 Like

the first character is always a d or a -. this lets you know whether or not that particular entry for your results of ls -l is a directory (it will show d) or a file (-).

The r stands for the owners permission to read the file/directory.

More about file permissions here

Hi !

In my git bash terminal when typing - (test is a file in the desktop directory which is my present working directory.

chmod a-x test

nothing happens. i.e. when I type ls -l again - the permissions are still the same i.e drwxr-xr-x.

Also, there is only one user of this laptop and the files are also showing only one username. So, could it be because of that - it doesnt make sense though - if I am permitted to change the permissions of all users, then if there is only one user also, it should permit me to change the permissions of that user.

If anyone can clarify, would be appreciated. Thanks.

‘Test’ is a folder - not a file - sorry.

You mention gitbash so I guess you’re on windows? Unfortunately the normal windows filesystems don’t properly support unix permissions so commands like chmod won’t alter anything. You can have a wee web search for more details if you’re curious about it.

I get it. Thank you for the help.

1 Like