Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write bash script that rotate logs. Do the following: - create a log directory. The directory is an argument to routate the file names -

Write bash script that rotate logs.

Do the following:

- create a log directory. The directory is an argument to routate the file names

- file names in the format .number.log

- if NOT vaild - input parameters such as no inputs, negative number, not a directory and non writable directory. Provide feedback to the user and end the program

- if IS VAILD - Rename all files with name (e.g. -3 will rename all files to .3.log). Delete all files with number higher than 5

Make sure its a simple script

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

Step: 3

blur-text-image

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

Samsung Galaxy S23 Ultra Comprehensive User Manual

Authors: Leo Scott

1st Edition

B0BVPBJK5Q, 979-8377286455

More Books

Students also viewed these Databases questions

Question

What are the jobs responsibilities and duties?

Answered: 1 week ago

Question

1.what is the significance of Taxonomy ?

Answered: 1 week ago

Question

What are the advantages and disadvantages of leasing ?

Answered: 1 week ago

Question

Name is needed for identifying organisms ?

Answered: 1 week ago

Question

Define procedural justice. How does that relate to unions?

Answered: 1 week ago