有没有办法检查根文件夹的权限,/?我的意思是文件夹的权限,而不是其内容的(/var、/usr 等)权限?运行ls /..显示内容的权限。
ter*_*don 62
您还可以使用以下-d开关ls:
$ ls -ld /
drwxr-xr-x 28 root root 126976 Mar 20 17:11 /
Run Code Online (Sandbox Code Playgroud)
来自man ls:
-l use a long listing format
-d, --directory
list directory entries instead of contents, and do not derefer?
ence symbolic links
Run Code Online (Sandbox Code Playgroud)
n.s*_*.st 16
使用-a开关ls包括隐藏文件以及.和..在列表中,-l开关用于“长”列表(包括权限和其他信息):
ls -la /
Run Code Online (Sandbox Code Playgroud)
.最后一列中带有单个的行将包含有关所列目录本身的信息,即/:
drwxr-xr-x 26 根 4096 Mar 10 15:57 。
但是,如果您只需要有关/自身的信息,则terdon 的答案(使用-d开关)可能会更方便。
| 归档时间: |
|
| 查看次数: |
25372 次 |
| 最近记录: |