Write a C++ program that use exec Linux command: 1- When the program starts, you should...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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) 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)
Expert Answer:
Answer rating: 100% (QA)
Heres a simple C program that uses the execlp Linux command to execute either the command to remove ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Using accrual accounting rules, ABC Co . receives a deposit of $ 7, 0 0 0 on January 1 , 2 0 23, for services it will provide in March 2 0 2 3. At the end of March, the services are delivered to its...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
kindly interpret the R squared In order to test its job candidates' technical skills, a company creates a timed Excel test (in minutes) to be completed during the interview. The company asks its...
-
The charter of Evergreen Corporation authorizes the issuance of 900 shares of preferred stock and 1,400 shares of common stock. During a two-month period, Evergreen completed these stock-issuance...
-
What does a comparison of the heats of combustion of benzene (3265 kJ/mol; 781 kcal/mol), cyclooctatetraene (4543 kJ/mol; 1086 kcal/mol), [16]-annulene (9121 kJ/mol; 2182 kcal/mol), and [18]-annulene...
-
Why is it important to keep a chart of all deadlines during the appellate process?
-
On June 30, 2014, Freeman Companys total current assets were $800,000 and its total current liabilities were $400,000. On July 1, 2014, Freeman issued a short-term note to a bank for $80,000 cash....
-
The following data are available for AAA Corp: In 2019, Purchases of Material A are: On Jan, 5,000 units at 40 per unit; Feb, 12,000 units at 45 per unit; April, of 17,000 units at 50 per unit; and...
-
George Pharmacy is a pharmaceutical salesman who has been very successful at his job in the last few years. Unfortunately, his family life has not been very happy. Three years ago, his only child,...
-
Woolworths drives innovation and change in the food retailing supply chain (AUS 2018) Australian large retailers are increasing their demand for enabling technologies. Woolworths is no exception....
-
A Corporation is contemplating the purchase of a piece of equipment. The Corporation can either buy it at Joe's Equipment Shop, which will finance the purchase with a special rate of interest or at...
-
An object weighing 300 N and a volume of 0.5 m 3 in air is immersed in oil after being tied to a string connected to a balance. The scale now reads 275 N. Find the density of the oil.
-
To keep things simple, assume a zero - coupon bond. Bond X pays $ 2 0 , 0 0 0 in 1 0 years. Bond Y pays $ 2 0 , 0 0 0 in 2 0 years. Suppose the interest rate increases to 1 4 percent. Using the rule...
-
on November 1 st the Home Mortgage Balance was 1 9 9 0 0 0 the interest rate for the loan is 8 % , assuming that the monthly mortgage payment is $ 1 , 9 9 0 how much is the interest amount
-
Sheridan Inc. has beginning work in process $23,800, direct materials used $220,800, direct labor $202,400, total manufacturing overhead $165,600, and ending work in process $29,200. What are the...
-
A student is performing an experiment using a resonance column and a tuning fork of frequency 244 s. He is told that the air in the tube has been replaced by another gas (assume that the column...
-
Feller Company purchased a site for a limestone quarry for $100,000 on January 2, 2019. It estimate that the quarry will yield 400,000 tons of limestone. It estimates that its retirement obligation...
-
Carl and Jenny adopt a Russian orphan. The adoption takes 2 years and two trips to Russia and is final in 2012. They pay $6,000 in 2011 and $7,500 in 2012 of qualified adoption expenses, and have AGI...
-
Cypress Corporation has regular taxable income of $170,000 (assume annual gross receipts are greater than $5 million) and regular tax liability of $49,550 for 2012. The corporation also has tax...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
The life \(T\) in hours of a vibration transducer is found to follow exponential distribution \[p_{T}(t)= \begin{cases}\lambda e^{-\lambda t}, & t \geq 0 \\ 0, & t <0\end{cases}\] where \(\lambda\)...
-
Fill in the Blank. If any parameter of a vibrating system is not known precisely, the resulting vibration is called ____________ vibration.
-
The probability distribution function, \(P(\widetilde{x})\), denotes a. \(P(x \leq \tilde{x})\) b. \(P(x>\widetilde{x})\) c. \(P(\tilde{x} \leq x \leq \tilde{x}+\Delta x)\)
Study smarter with the SolutionInn App