Question: Help in Unix bash Do not use system() function call in your program Write a C/C++ program (a4part2.c) to do the following tasks. (1) Your
Help in Unix bash
Do not use system() function call in your program
Write a C/C++ program (a4part2.c) to do the following tasks.
(1) Your C program will change the current working directory to a4part1, and call pwd and then it will call ls function to list all the directories and files using R option.
Your C program will navigate the directory structure (as shown in Part1) to visit each subdirectory.
(2) it will list each directory entry and its type.
(3) it will list the inode of each entry with the file-type (e.g., regular file, symbolic link, etc.).
(4) as your C program navigates the directory structure, it will check whether the current directory which it visits has a subdirectory or not. If not, then it will output a message:
** folder1 - this directory does not have any subdirectory **.
a4partl folder1 folder2 file3 link4 file1 file2 a4partl folder1 folder2 file3 link4 file1 file2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
