Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

linux, virtualbox and centOS7 Write a script in BASH that automatically writes your systems private (eth0) and public IP addresses to a file within your

linux, virtualbox and centOS7

Write a script in BASH that automatically writes your systems private (eth0) and public IP addresses to a file within your home directory called ipaddresses. The automatically generated ipaddresses file should contain the following information:

The date command must be used to provide a timestamp at the top of the file in the following format: Timestamp: (HH:MM) MMDDYYYY. The next line should contain: ETH0 IP: XXX.XXX.XXX.XXX. The last line should contain: Public IP: XXX.XXX.XXX.XXX.

The script should overwrite any current entries with the new entries, not append them to the file.

Dont forget to change the permissions on the script so that it is executable!

Setup a cron job to run the script every 30 mins, you can verify this works by checking the timestamp in the ipaddresses file to see if it is being updated correctly, make sure you let your VM run for a few hours during testing.

Be sure to include a copy of your .bashrc file, a copy of your ipaddresses script and output file, and your cron job line in your lab report along with a description of how you set it up and what it means.

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

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

Explain all drawbacks of application procedure.

Answered: 1 week ago

Question

Explain the testing process of accounting 2?

Answered: 1 week ago