Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Users and Permissions File Permissions

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

chmod console issues

Hi,

When I type ls -l into into the console I am not seeing all of files. Instead, I see this:

total 4 drwxrwxr -x 2 treehouse treehouse ........................documents

How do I get the console to show all of the files so that I can execute the chmod command?

Thanks-

3 Answers

Hey Juliette,

Add the "a" switch right beside -l in the ls command:

"ls -al"

Btw, the "a" stands for "all" :P And I have no idea what that total stands for to be honest haha

It depends on where you created "hello.txt" and where you are currently in the system as to how to properly use chmod on that text file. Check and see if its in maybe your "documents" folder or another folder? You can also run this command (copy it exactly) to find the file (as long as you are in a parent directory):

find | egrep hello.txt

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

I am using the console/terminal that is provided via this Treehouse class, so all of the files should be easily accessible there.

find . | egrep hello.txt -This did help me to locate hello.text, but then when I run ls -l it takes me back to documents.....and then when I try to run chmod o+w hello.txt it returns this: no such file or directory.

Hmmmmm......I have no idea what happened. I've just been following along.

The console/terminal provided via Treehouse is the very same as the kind you see in Mac and Linux systems.

I don't know what you mean when you say it takes you back to documents. ls only lists the current files and folders in the directory you're currently in. If it is listing files and/or folders that are inside the documents folder, that means that you are currently running commands inside the documents folder. You need to use cd .. to go back up a directory, which should be your home directory.

Btw, if the area beside where you type in the terminal says "~/documents" that means you are in the documents folder.

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

Thanks Marcus. I think that I am going to have to start over as I am not remembering all of the commands right off of the bat, that's why I am having a hard time navigating around the console. It seems simple, but when you're new at something sometimes it's that one little thing that can throw you off. I will refer to your responses on the next go round.

Cheers:-)

I understand. That'd be a good thing! Good luck, Juliette!