[cs631apue] Question about -a option

Tyler Romeo tromeo at stevens.edu
Fri Oct 16 04:28:42 EDT 2015


Hi,

By "directory entries", it just means entries in the directory being listed. The "-a" option should show everything that starts with a dot, both files and directories. You do not only list directories that begin with a dot.

-- 
Tyler Romeo
Stevens Institute of Technology Class of 2016
Major in Computer Science

From: Shicong Huang <shuang14 at stevens.edu>
Reply: Shicong Huang <shuang14 at stevens.edu>
Date: October 16, 2015 at 01:21:28
To: cs631apue at lists.stevens.edu <cs631apue at lists.stevens.edu>
Subject:  [cs631apue] Question about -a option  

Hi,

I met a question when I tried to implement -a option. In the instruction, -a shall include directory
entries whose names begin with a dot. If I am not wrong, I still need to ignore file entries whose 
names begin with a dot. So, consider this case:

ls -a /foo/bar/

foo's access permission: drwxrwxrwx
bar's access permission: drw-rw-rw-

Since I have "r" permission of bar, I can read all sub entries of it. But I don't have any
"x" permission of bar, that means I can't stat(2) its sub entries. So, how do I know a sub
entry is a directory?


Thanks!

Shicong Huang
_______________________________________________  
cs631apue mailing list  
cs631apue at lists.stevens.edu  
https://lists.stevens.edu/mailman/listinfo/cs631apue  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20151016/192c8256/attachment-0001.html>


More information about the cs631apue mailing list