[cs631apue] Some questions on midterm....

Tejas Nadkarni tnadkarn at stevens.edu
Sat Oct 5 13:45:35 EDT 2013


Jan/All,

Some quick questions:

- How important is variable column width that's dynamic to the content like
the system 'ls' implementation does - this is specific to the -l
longformat. Is this required and will points be deducted? Mine uses fixed
widths which work for nearly every condition but obviously large file sizes
will throw it off. Want to check before I invest more time in it

- What is the point of the '-d' flag? When I tried it on the system 'ls' it
seems to just print out whatever the full pathname of the argument was?
i.e. "ls -d /" will just print "/" or "ls -d" will just print "." or "ls -d
~/" will print the full path of my home directory. Using the -l flag just
shows the info of that one entry. It's not clear if all we're doing is
printing out the path or cwd and exiting?

- the extra credit to implement -c that's for ls with the short format
right? i.e. not -l because we have to multi-column output for '-l' already.
I'm assuming then that -c is only valid without -l

- For the -R recursive flag, my functionality works great but the output is
not similar to system ls. It's not clear if our output has to match the
system implementation. In the system implementation, each directory is
printed out then there's a break then the next directory path then it's
contents, etc. Does our implementation have to match? I'm using FTS and the
way it traverses the directory structure makes printing it out as the
system ls does a bit challenging. Currently mine just prints out the
files/directories as it traverses based on sort. Any thoughts?

Thanks,
Tejas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20131005/ae416724/attachment.html>


More information about the cs631apue mailing list