Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Here are the two shell scripts and the crontab configuration to perform the tasks you described Shel...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