Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!