How to check permissions of a specific directory? How to check permissions of a specific directory? unix unix

How to check permissions of a specific directory?


Here is the short answer:

$ ls -ld directory

Here's what it does:

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

You might be interested in manpages. That's where all people in here get their nice answers from.

refer to online man pages


You can also use the stat command if you want detailed information on a file/directory. (I precise this as you say you are learning ^^)


$ ls -ld directory

ls is the list command.

- indicates the beginning of the command options.

l asks for a long list which includes the permissions.

d indicates that the list should concern the named directory itself; not its contents. If no directory name is given, the list output will pertain to the current directory.