Question: Write a C++ program that use exec Linux command: 1- When the program starts, you should display for the user the two options as

Write a C++ program that use exec Linux command: 1- When the program starts, you should display for the user     

Write a C++ program that use exec Linux command: 1- When the program starts, you should display for the user the two options as follow: 1- Linux command line to remove the directory (dirfolder) from the current working directory. 2- Linux command line to display all of the existing processes. 2. Then prompt the user to input option word. If the user type the word (Remove) then remove the directory (dirfolder) from the current working directory (assume the directory dirfolder exists) and if the user type (Process) then display all of the existing process. Note: You should use any of exec Linux command (execl, execlp, execle, execv, execvp, execupe), Sample Input/output The following sample output of this program and should help about the way the program should start. User Menu: Option #1: Linux command line to remove the directory (dirfolder) from the current working directory. Option #2: Linux command line to display all of the existing processes. Enter the option: (User Input)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a simple C program that uses the execlp Linux command to execute either the command to remove ... View full answer

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 Programming Questions!