Solved

Unix count users logged in

Posted on 2007-12-03
1
954 Views
Last Modified: 2013-12-20
I need to count the 10 users that have logged into the system fewer times over the last month. (ordered from lowest to highest)
0
Comment
Question by:axtur
1 Comment
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 20400502
Hi,

axtur:


last | grep -v wtmp | awk '{print $1}' | sort | uniq -c | sort > /tmp/u.$$
c=`wc -l < /tmp/u.$$`
c=`expr $c - 1`
tail -$c /tmp/u.$$ | head -10
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now