Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

List For Specific Day Specifying a--datein YYYY-MM-DD format should list all users or hosts that were logged in at some point during that date, even

List For Specific Day

Specifying a--datein YYYY-MM-DD format should list all users or hosts that were logged in at some point during that date, even if their start time or end time is different. For example, usercwsmithlogged in on Feb 14 and logged off on Feb 15, but they show up when the following command is run:

[eric@centos7 a2]$ ./assignment2.py -l user -d 2018-02-14 usage_data_file User list for usage_data_file ============================= cwsmith 

This should work for hosts as well:

[eric@centos7 a2]$ ./assignment2.py -l host -d 2018-02-14 usage_data_file Host list for usage_data_file ============================= 10.40.105.130 

If the user types in an invalid date, the script should halt and print the following error message:

[eric@centos7 a2]$ ./assignment2.py -l host -d 2018-02-xx usage_data_file Date not recognized. Use YYYY-MM-DD format. 

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions