Question: c language Prog2.c: Modify the template program, lookout.c on p. 56-57 with the following additional capabilities a. Repeat the following steps 100 times x. Wait

Prog2.c: Modify the template program, "lookout.c on p. 56-57 with the following additional capabilities a. Repeat the following steps 100 times x. Wait 1 seconds using "sleep" call xi. Call "stat system call to extract the file attributes against "test.txt" xii. If you find any changes in any of the attributes, 1. Print the information on which attribute is changed. Make sure to print the previous value and the new value (i.e., the changed attribute value). There may exist more than 1 attribute values changed. 56 The file in context /display file information printf(" File is : ", pathname); printf("Size Uld bytesin", statbuf.st Sizel: printf("User-id id, Group-id d ", statbuf.st_uid, statbuf.st.gid); printf("Permissions: Is ", descrip); return (0) The following program lookout is a more useful tool. Given a list of filenames, it checks once a minute to see if any file in the list has changed. It does This by monitoring the modification time of each file (stuntine). It is a utility intended to be run as a background process. lookout - print message when file changes #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
