Description
Part 1
Write a program where a child is created to execute command that tells you the date and time in
Unix. Use execl(…). Note: you need to specify the full path of the file name that gives you date and time information. Announce the successful forking of child process by displaying its PID.
Part 2
Write a program where a child is created to execute a command that shows all files (including hidden files) in a directory with information such as permissions, owner, size, and when last modified. Use execvp(…). Announce the successful forking of child process by displaying its PID.
Part 3
[Step 1] Process_P1.c:
Create two files namely, destination1.txt and destination2.txt with read, write and execute permissions.
[Step 2] Process_P2.c: Copy the contents of source.txt into destination1.txt and destination2.txt as per the following procedure until you reach the end of the file:
- Read the next 50 characters from source.txt, and write to destination1.txt
2 . Then the next 100 characters are read from source.txt and written into destination2.txt.
Once you’re done with the successful creation of executables for the above two steps do the following:
Write a C program and call it Parent_Process.c. Execute the files as per the following procedure using execv system call.
[Step 3] Fork a child process, say Child 1 and execute Process_P1. This will create two destination files according to Step 1.
[Step 4] After Child 1 finishes its execution, fork another child process, say Child 2 and execute
Process_P2 that accomplishes the procedure described in Step 2.



