Computer Science 202
Systems Programming Concepts Using C
Lab 10 - Getting Information
Winter 1998
Overview
Write a C program to determine the number of files that are larger than 1000 bytes
in the current directory.
Specifics
Write a program that follows the outline given below:
- create a pipe
- fork a process
- re-direct standard out
- have child process issue the appropriate directory listing command
- have parent wait for child to finish
- convert a file descriptor to a file pointer
- read in the information generated by the directory listing command one
line at a time
- determine which entries are larger than 1000 bytes
Deliverables
The following must be delivered to your instructor via text-only
email by the end of class on 11th Tuesday March 17, 1998.
- Source code for your program.
In addition, you must deliver to the instructor by the end of lab on
11th Tuesday, March 17, 1998 the following:
- A printed copy of your source code.
Notes
- Since this is an in-class lab only minimal commenting is required.
- Make sure that you name is on the file.
- Meaningful variable names are required.
- I suggest you start with the program day.c handed out in class.