如何查看特定目录的权限?
我知道使用 ls -l目录/目录/文件名
会告诉我文件的权限。如何在目录上执行同样的操作?
I know that using ls -l "directory/directory/filename"
tells me the permissions of a file. How do I do the same on a directory?
我显然可以在更高目录中的目录上使用 ls -l 层次结构,然后滚动直到找到为止,但这真是太痛苦了。如果我在实际目录上使用
ls -l ,它将提供其中的文件的权限/信息,而不是实际目录的文件。
I could obviously use ls -l
on the directory higher in the hierarchy and then just scroll till I find it but it's such a pain. If I use ls -l
on the actual directory, it gives the permissions/information of the files inside of it, and not of the actual directory.
我在Mac OS X 10.5和Linux(Ubuntu Gutsy Gibbon)的终端上都尝试过,结果是一样的。我应该使用某种标志吗?
I tried this in the terminal of both Mac OS X 10.5 and Linux (Ubuntu Gutsy Gibbon), and it's the same result. Is there some sort of flag I should be using?