小编wrg*_*grs的帖子

为什么我不能列出具有读取权限的目录?

我在其中创建了一个目录d和一个文件f。然后我只给了自己对该目录的读取权限。我明白这应该意味着我可以列出文件(例如这里),但我不能。

will@wrmpb /p/t/permissions> ls -al
total 0
drwxr-xr-x   3 will  wheel  102  4 Oct 08:30 .
drwxrwxrwt  16 root  wheel  544  4 Oct 08:30 ..
dr--------   3 will  wheel  102  4 Oct 08:42 d
will@wrmpb /p/t/permissions> ls d
will@wrmpb /p/t/permissions>
Run Code Online (Sandbox Code Playgroud)

如果我更改写入和执行的权限,我可以看到该文件。

will@wrmpb /p/t/permissions> chmod 500 d
will@wrmpb /p/t/permissions> ls d
f
will@wrmpb /p/t/permissions> 
Run Code Online (Sandbox Code Playgroud)

为什么是这样?我正在使用 MacOS。

编辑:参考@ccorn 的回答,我使用的是鱼并type ls给出以下内容:

will@wrmpb /p/t/permissions> type ls
ls is a function with definition
function ls --description 'List …
Run Code Online (Sandbox Code Playgroud)

osx permissions fish

15
推荐指数
1
解决办法
5871
查看次数

查找手册页的内容

我可以找到手册页的内容吗?

man bash将近 6000 行长,我想知道页面中的章节标题。

man

6
推荐指数
1
解决办法
1149
查看次数

标签 统计

fish ×1

man ×1

osx ×1

permissions ×1