Chapter 7. Putting It All Together:
In this chapter
ls command nicely ties together everything we’ve seen so far. It uses almost all of the APIs we’ve covered, touching on many aspects of Unix programming: memory allocation, file metadata, dates and times, user names, directory reading, and sorting.
In comparison to modern versions of
ls, the V7
ls accepted only a handful of options and the meaning of some of them is different for V7 than for current
ls. The options are as follows:
Print all directory entries. Without this, don’t print ’.’ and ’..’. Interestingly enough, V7