Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to find top 3 users currently logged on Post 302443995 by whyatepies on Tuesday 10th of August 2010 03:37:43 PM
Old 08-10-2010
is there a way using grep because though the above answers help me, we haven't covered it in class?
thank you.

---------- Post updated at 11:37 AM ---------- Previous update was at 11:36 AM ----------

Quote:
Originally Posted by Ikon
Code:
w -uh | grep -om 3 '^\S*'

that helps a lot. pretty sure this is what the teacher wanted.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how many users logged

in unix what is the syntax to find out how many users are currently logged in (4 Replies)
Discussion started by: trichyselva
4 Replies

2. Shell Programming and Scripting

to find the number of users logged in

Hi, can u say to display the number of users that logged before me. thanks (10 Replies)
Discussion started by: shanshine
10 Replies

3. Post Here to Contact Site Administrators and Moderators

logged out users

how to find out users who logged out within 5 minutes (1 Reply)
Discussion started by: roshni
1 Replies

4. AIX

How to find the top 6 users (which consume most space)?

Hi everybody, I want to know if there is any posibility to find out - on an AIX system - which are the the users who consume most space or at least a posibility to obtain a list with all the users and how much space are they consuming ? Trying to use du command was useless. Any idea?... (5 Replies)
Discussion started by: RebelDac
5 Replies

5. Shell Programming and Scripting

Users Not Logged in

I have searched the forums but have not mangaed to quite find what im looking for. I have used to /etc/passwd command to present me a list of all users the who command to present all users currently logged on, but what i want to know is what command can i use to display users that are registered... (12 Replies)
Discussion started by: warlock129
12 Replies

6. UNIX for Dummies Questions & Answers

How many users are logged in?

How do I find this out? I have a feeling its a simple command such as who, but I just don't know what it is. I've had a search on here but either I can't put it into the right search criteria or there isn't a topic on it. Thanks. EDIT: Delete this thread, as I posted it I noticed the... (0 Replies)
Discussion started by: chris_rabz
0 Replies

7. Shell Programming and Scripting

find top 4 users currently logged on can i use grep

For the first 4 users only that are currently logged in output their effective user id. It's not important the order in which each logged in i just want to have the top 4. Same question as here...... (0 Replies)
Discussion started by: whyatepies
0 Replies

8. Red Hat

Showing all users in 'users' and 'top' commands

Hi All, I work in a multi user environment where my school uses Red Hat Linux server. When I issue commands such as "top" or "users", I get to see what others are doing and what kinds of applications they are running (even ps -aux will give such information). "users" will let me know who else is... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

9. Shell Programming and Scripting

Script to find users not logged in for 90 days

Dear All, I need your help in finding out users not logged in to linux system for more than 90 days. I found a script from our forum i am getting error while using that. from the code i have debugged line by line to see where i am getting the problem. i found out the below line i am getting... (5 Replies)
Discussion started by: Sachinlinux
5 Replies
rusers(1)							   User Commands							 rusers(1)

NAME
rusers - who is logged in on remote machines SYNOPSIS
rusers [-ahilu] host... DESCRIPTION
The rusers command produces output similar to who(1), but for remote machines. The listing is in the order that responses are received, but this order can be changed by specifying one of the options listed below. The default is to print out the names of the users logged in. When the -l flag is given, additional information is printed for each user: userid hostname:terminal login_date login_time idle_time login_host If hostname and login host are the same value, the login_host field is not displayed. Likewise, if hostname is not idle, the idle_time is not displayed. A remote host will only respond if it is running the rusersd daemon, which may be started up from inetd(1M) or listen(1M). In the absence of a name service, such as LDAP or NIS, rusers displays host names as numeric IP addresses. OPTIONS
-a Give a report for a machine even if no users are logged on. -h Sort alphabetically by host name. -i Sort by idle time. -l Give a longer listing in the style of who(1). -u Sort by number of users. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWrcmdc | +-----------------------------+-----------------------------+ SEE ALSO
who(1), inetd(1M), listen(1M), pmadm(1M), sacadm(1M), attributes(5) SunOS 5.11 7 Mar 2003 rusers(1)
All times are GMT -4. The time now is 02:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy