Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to write a shell log rotation script. The requirements are below. The script must be a single file. Script must rotate /var/log/messages Archived

I need to write a shell log rotation script. The requirements are below.

  1. The script must be a single file.
  2. Script must rotate /var/log/messages
  3. Archived log files should be date+timestamped and compressed in a .tar.gz
  4. Rotation should occur every hour on the hour.
  5. Files older than 7 hours should be deleted.
  6. Permissions for the archived files should be root rw-rr
  7. The group should be root:nobody
  8. Every command in the script should be explained in a comment.
  9. Cannot use the logrotate command, logrotated, or any log rotation software.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Briefly describe the six characteristics of sport groups.

Answered: 1 week ago

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

List the components of the strategic management process. page 72

Answered: 1 week ago