Question: For this assignment, you will create a folder which contains the programs and then zip the folder along with the screenshot of the successful run,
For this assignment, you will create a folder which contains the programs and then zip the folder along with the screenshot of the successful run, for submission to blackboard. Please be sure to document your program appropriately. You must rename the file using your last name followed by your first name followed by a dash followed by the assignment name For instance, this is homework so Id turn it in as AbbasFaisalHomeworkzip Part I: Write a program that reads a given directory on the command line and searches for files that match using some or all of the following: If a user enters name use the next argument after name as the name of the file or directory you search for If a user enters R the search should be recursive not otherwise If a user enters uid use the next argument after uid as the UID to search for only select files owned by the given uid if a user enters type use the next argument after type as the type of file to search for only include files of that given type for instance regular files, directories, block files, etc. Part II: Write a program that recursively prints out all the full paths of all directories and files in a given directory that uses forks the children to do the recursive methods. Each process should print out their directory and all regular files in their directory All children and parent should contain a program that runs upon its exit indicating that it is dying indicate directory If a directory has a subdirectory, fork a child to recurse into the subdirectory. Note that means the parent stays in the current directory and the child does the subdirectory call. Maintain a counter and make sure not to leave any zombies around... each parent should wait for its children before exiting. Extra credit Part I: Create a mechanism for the search to use the size of the file: I want to see lt gt and eq you can use all three at the same time Part II: Consider the performance of Part II Create a version that doesnt fork and compare the time it takes to run both... you should run each program several times to ensure accurate results. The major answer you want to ask Does adding the fork make for better performance? in c language
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
