Question: 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 

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

1 Expert Approved Answer
Step: 1 Unlock

Here are the two shell scripts and the crontab configuration to perform the tasks you described Shel... 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!