Question: c programming question print stat #include include #include unistd.h> string.h> tinclude stdbool.h> include void print stats(char *file path, char *name) // Use this unction to

c programming question print stat

c programming question print stat #include include #include unistd.h> string.h> tinclude stdbool.h>

#include include #include unistd.h> string.h> tinclude stdbool.h> include void print stats(char *file path, char *name) // Use this unction to print Lhe stats for a ile 1 Use stat command to get the stats Hints: / 1. Use st mode to print the permissions 2. Use getpwuid to print owner from st_uid / 3. Use getgrgid to print group name from st_gid void 1s(char *path) If the given path is directory, open the directory and read the entries. For each file, call print stats to print the statistics int main(int argc, char *argvtl) f receive the path name return

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!