Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need Solution to this question Write a program which create n number of main directories / folder and n number of sub directories / sub
Need Solution to this question
Write a program which create n number of main directories / folder and n number of sub directories / sub folders in each main directory / folder. Number and names of main directories and number and names of sub directories are passed as command line argument. Create all folders in current working directory, or you can make them at /home/oracle/Desktop. For example, ./ Lab_mid_q1 3 mid1 2 q1 q2 mid2 2 q1 q2 mid3 1 q1 For above example, your program should create 3 main folders "midl", "mid2" and "mid3". "midl" has 2 sub-folders "q1" and "q2" "mid2 has 2 sub-folders q1" and "q2" "mid3" has 1 sub-folder "q1". Use mkdir and execv system calls. Use man command if you don't know how to use these system callsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started