Solved

Unix count users logged in

Posted on 2007-12-03
1
957 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

810 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