Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help in C Programming NOT C++ or C# :- Part I: Write a program that reads a given directory (on the command line) and

Need help in C Programming NOT C++ or C# :- 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:

1-If a user enters name use the next argument (after name) as the name of the file or directory you search for

2- If a user enters R the search should be recursive (not otherwise)

3- 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)

4- 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.)

5- 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: Write a program that creates children and only those children specified via a global variable (set to 3).

1-Only three children should ever be alive and one parent at any given time.

2- All (children and parent) should contain a program that runs upon its exit indicating that it is dying.

3- the parent continually runs, but the children sleep for a random time which should be between 5 and 10 seconds and then exit. (Kill the parent with [CTRL-C])

4- All children should be waited on (in this C program)

5-Instead of only creating three children and then letting them die create three children and keep three alive! (hint: upon wait create a new child)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

6. Conclusion:

Answered: 1 week ago

Question

Appreciate the help. I'll rate the help

Answered: 1 week ago

Question

What are the best practices for managing a large software project?

Answered: 1 week ago