Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a script named lab6s2 that writes the current time and date, lists logged-in users, and prints the systems uptime to a log file. The

Write a script named lab6s2 that writes the current time and date, lists logged-in users, and prints the systems uptime to a log file. The time should be printed with the format of 03:55 am as opposed to military time. The date should be printed like this: 09/10/12 Numbers should be zero-padded to 2 digits (e.g. 03 instead of 3).

(It is advisable to look at the date commands many options to format your output. Also, use the uptime command to print system uptime.)

This output should be appended to a logfile named lab6s2.log. Create a cron job to execute this script every 2 minutes.

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

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions

Question

Find the distance between the two points S(-5,-2) and T(-3,4)

Answered: 1 week ago