Possible Duplicate:
How can I make ls show information about the directory specified only, not info about its sub-files or folder contents?

I am new to UNIX and I want to display the permission for several directories without listing the permission for the files inside those directories.

I have the following directories - each of this directories contains a file inside them, for example :


I am using this command to list directories and their files : ls di* what should I add to this command to list the files permission of the directories without listing the files permissions?


If you use the -d option for ls, only the directory entries will be displayed. From the ls manpage:

   -d, --directory
          list directory entries instead of contents, and do not  derefer
          ence symbolic links

For your example:

ls -ld Di*
  • thanks for the answer, using command ls -ld di* result in /usr/bin/ls: No match
    – Andy M
    Jan 26 '13 at 5:59
  • @JohnSmith - Updated to match your example directory names.
    – jordanm
    Jan 26 '13 at 6:02
  • thanks, it works. using this command instead of the ls -l just doesnt display the total # is that how you know the permissions are only for the directories and not the files?
    – Andy M
    Jan 26 '13 at 6:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.