Write a Linux shell script that performs the following tasks: a. Capture the current date/time and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Linux shell script that performs the following tasks: a. Capture the current date/time and append this information in a file named file 1.txt. b. Capture the list of users currently logged into the Linux system and append this data into file1.txt. Write another shell script to perform the following tasks: a. Create a directory name temp 1. b. Copy the file1.txt to temp 1 folder and rename the copied file as file1.bak. Use crontab to schedule the first shell script above to be executes every minute. Next add another task of executing the second shell script at a specific time of the day. Finally, add a third task in the crontab to shutdown the Linux system at 12 midnight. Provide the shell scripts along with the sample output screenshot. Include as well as the details of your crontab to show the schedule of the above THREE (3) tasks to be executed. Write a Linux shell script that performs the following tasks: a. Capture the current date/time and append this information in a file named file 1.txt. b. Capture the list of users currently logged into the Linux system and append this data into file1.txt. Write another shell script to perform the following tasks: a. Create a directory name temp 1. b. Copy the file1.txt to temp 1 folder and rename the copied file as file1.bak. Use crontab to schedule the first shell script above to be executes every minute. Next add another task of executing the second shell script at a specific time of the day. Finally, add a third task in the crontab to shutdown the Linux system at 12 midnight. Provide the shell scripts along with the sample output screenshot. Include as well as the details of your crontab to show the schedule of the above THREE (3) tasks to be executed.
Expert Answer:
Answer rating: 100% (QA)
Here are the two shell scripts and the crontab configuration to perform the tasks you described Shel... View the full answer
Related Book For
Understanding Business Ethics
ISBN: 9781506303239
3rd Edition
Authors: Peter A. Stanwick, Sarah D. Stanwick
Posted Date:
Students also viewed these programming questions
-
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...
-
What functions are there in the mazeAsn4 module: print_maze(maze) Description: This function displays the maze. The accessible cells are labelled G i.e. green, the blocked cells are labelled R i.e....
-
1. If net profit is $47,025; depreciation is $2,200; accounts receivable increases $5,056; accounts payable increases $4,673; and inventory declines $850; what is the operating cash flow for the...
-
On January 1, 2020, Mayor Company issued 40,000 5-year bonds with a $1,000 par value each. The market values the bonds at $30,000 less than the face value of the bonds. The stated rate of interest is...
-
The Bijou Theater shows vintage movies. Customers arrive at the theater line at the rate of 100 per hour. The ticket seller averages 30 seconds per customer, which includes placing validation stamps...
-
Table B. 12 presents data on a heat treating process used to carburize gears. The thickness of the carburized layer is a critical factor in overall reliability of this component. The response...
-
Mikita Inc. experienced the following accounting events during its 2014 accounting period: 1. Paid cash to settle an account payable. 2. Collected a cash advance for services that will be provided...
-
How do resource dependency theory and institutional theory inform our understanding of how organizations design their structures to manage external dependencies and institutional pressures ?
-
Using dimensional equations, convert (a) 2 wk to microseconds. (b) 38.1 ft/s to kilometers/h. (c) 554 m 4 / (day kg) to ft 4 / (min lbm).
-
Find u - v, 2(u + 3v), and 2v - u. u (6,-8, 7, 3), (a) u-v= 8, (b) 2(u + 3v) = (c) 2v - u = v = (-2,-,-,-1 3 32 3 28 2 7,4)
-
How does a business evaluate its strategic choices?
-
What is a 360-degree feedback process? How valid do you believe it to be?
-
How is the possession of valuable and scarce resources of an organization related to the planning and formulation of its corporate-level strategy for enhancing its competitive advantages in the...
-
U.S. executives earn every dollar of their pay. People who complain about these people earning millions are just envious that they are not being paid at that level. Build an argument for and against...
-
What would be effective ways to recruit qualified professionals to work for Tommy?
-
A product has a selling price of Rs 200 and a variable cost of Rs 50. Sales for March are 5,000 units and fixed costs for March are Rs 500,000. What is the profit for March?
-
A glass manufacturer produces hand mirrors. Each mirror is supposed to meet company standards for such things as glass thickness, ability to reflect, size of handle, quality of glass, color of...
-
McWane Corporation has been a fixture in the Birmingham, Alabama, business community since 1921. Started by J. R. McWane and still controlled by the McWane family, McWane Corporation has become an...
-
Which of the seven deadly sins do you believe is the most serious to commit? Which of the seven deadly sins do you believe is the least serious to commit? Do you think certain sins have gained or...
-
Headquartered in Munich, Germany, Siemens focuses on developing products for electronic and electronic engineering based industries. As with many large global manufacturing conglomerates, Siemenss...
-
A driver holds his hands on opposite sides of the 35-cm-diameter steering wheel in a modern sports car. A torque of 4.5 N m is required to turn the wheel. If the driver applies an equal force on...
-
A gymnast on the uneven parallel bars is at rest, tipped at a 45 angle from the vertical. The distance from her hands to her feet is 1.8 m. If we model her body as having a uniform cross section and...
-
The engine in a small airplane is specified to have a torque of 500 N m. This engine drives a 2.0-m-long, 40 kg single-blade propeller. On startup, how long does it take the propeller to reach 2000...
Study smarter with the SolutionInn App