Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
I understand that using ls -l "directory/directory/filename" informs me of the permissions of the file. How can I do the same upon the directory?

I could do ls -l on the directory higher in this hierarchy and later just scroll till I found it but it's such one pain. If I use ls -l on the directory, it gives some permissions/information of the files inside of it, and not of the actual directory.

I tried this in one on my terminal of both the Mac OS X 10.5 and Linux (Ubuntu Gutsy Gibbon), and it's giving me the same result. Is there any sort of flag I have to use?

1 Answer

0 votes
by (36.8k points)
edited by

Here is the short answer:

$ ls -ld directory

Here's what it does:

-d, --directory

list directory entries rather than the contents, and do not dereference symbolic links

Come and join Linux training to gain great knowledge. 

Do check out the video below

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...