Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. (14 points) Asome we have a pregran numed bigbrother, whose output format is as follows: usermame login_time logout_timir minutes_on If a user hasn't logged

image text in transcribed
5. (14 points) Asome we have a pregran numed bigbrother, whose output format is as follows: usermame login_time logout_timir minutes_on If a user hasn't logged out, the logout_time is set to "none'. Times are otherwise in 24 -hotr 12.01am it would say that they logged in at 12:00, and had been on for 1 minute. Here is some sample output, aceriming yot've run the command at 1130pm: Bart logged on 10 minutes ago, and is still on. Hotner logged in at 10:15am for three minutes; and later logged in at 10:20am for 10 minutes. Smithers was logged in most of the day in one window, and also opened a second window for just ower an bour. Note that: (1) the program nses groups of spaces, sometimes more, sometimes fewer. so the outpat is in neat columns. (There are no tals in the output.), and (2) the ontpent is sorted by username for everyone who logged on today in the order they logged in. Write shell commands that begin with and generate the following output: (a) (two points) Slow the full lines for the five longest login sessions of the day: (b) (two points) Show the full line for all login sessions that began before Ram. (c) (two points) Show the full line for all login sessions that ended after 5pm. (d) (two points) Show only the names and login times for all sessions. You may only use a single awk command after the pipe. (e) (two points) Show only the names and login times for all sessions. You may not use auk in your answer. (f) (four points) Give the total login time for user carl, counting all login sessions

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

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions