<div dir="ltr">Hi,<div><br></div><div>I met a question when I tried to implement -a option. In the instruction, -a shall include directory</div><div>entries whose names begin with a dot. If I am not wrong, I still need to ignore file entries whose </div><div>names begin with a dot. So, consider this case:</div><div><br></div><div>ls -a /foo/bar/</div><div><br></div><div>foo&#39;s access permission: drwxrwxrwx</div><div>bar&#39;s access permission: drw-rw-rw-</div><div><br></div><div>Since I have &quot;r&quot; permission of bar, I can read all sub entries of it. But I don&#39;t have any</div><div>&quot;x&quot; permission of bar, that means I can&#39;t stat(2) its sub entries. So, how do I know a sub</div><div>entry is a directory?</div><div><br></div><div><br></div><div>Thanks!</div><div><br></div><div>Shicong Huang</div></div>