Question: 1. Write a bash script: a. It will run forever until the file /tmp/killspring exists. If that file exists, quit. b. It should count the

1. Write a bash script:

a. It will run forever until the file /tmp/killspring exists. If that file exists, quit.

b. It should count the number of files in /tmp (use wc), and output that count to the logs using the logger command.

c. Example log message: There are 10 files in /tmp.

d. After the logs are written, sleep 10 seconds.

2. Make a unit file which runs the script in question 1.

a. It starts as part of multi-user mode

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!