USERS command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting USERS command
# 1  
Old 05-29-2008
Network USERS command

Hi,

how do you display login names of users logged on but in a list? I tried 'users' but that is giving all the user login names on 1 line, I want 1 login name on each line like a list. How do I do that?
# 2  
Old 05-29-2008
try this:
Code:
who | cut -d ' ' -f1

# 3  
Old 05-29-2008
Or this:

Code:
users | tr ' ' '
'

Yes, that's a newline between an opening and a closing quote in the second argument to tr
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep command giving different result for different users for same command

Hello, I am running below command as root user #nodetool cfstats tests | grep "Memtable switch count" Memtable switch count: 12 Where as when I try to run same command as another user it gives different result. #su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies

2. Shell Programming and Scripting

Tracking users through history command

Hi folks, I have the basic query that there are 3 unix boxes having their individual access now in my team there are 4 members who are using the same credentials to access those 3 boxes through putty ssh from their windows desktop , now if i want to check which 4 members have executed the... (1 Reply)
Discussion started by: punpun66
1 Replies

3. SCO

Users can't run w command

Hi There I am running SCO Openserver 5.07 When a user try to run the command w they get the following error: w: Cannot open /unix for reading: Permission denied (error 13) On another server also running running SCO Openserver 5.07, and trying to run the w command they get the following... (4 Replies)
Discussion started by: wjace
4 Replies

4. Shell Programming and Scripting

Record all users' command

Hi experts, .history can record one user's own command history, but my request is, I want to record all users who run commands on that box, and export the commands to a file somewhere, which record the userid, time and full command. Is it possible? I just need for audit, and trace back, if... (3 Replies)
Discussion started by: newoz
3 Replies

5. AIX

command to kill all loged in users

Guy's I'm looking for command to kill all the loged in users in AIX server Is there specific command can help us to kill any loged in users I have this command who -u it'll show me the process ID of all the users but I want command to kill all the users including to root without... (1 Reply)
Discussion started by: Mr.AIX
1 Replies

6. Shell Programming and Scripting

command to add users to group

does a command exist to add users to more than one group? i think the usermod command can do this but i'm not really sure. past ways of me doing this has always been to just hack the /etc/group file and put the user in whatever group i need him to be in. however, vi..ing files like /etc/groups... (2 Replies)
Discussion started by: Terrible
2 Replies

7. UNIX for Advanced & Expert Users

who -9 command shows logged out users

List using 'who -u' command shows logged out user name along with active users. 'kill -9' command fails to kill the user as there no prcess is running. Any solution regarding this problem. (5 Replies)
Discussion started by: utpol_68
5 Replies

8. UNIX for Advanced & Expert Users

w/who command returned zero users

Hi ppl, We are using Sun OS and recently, encountered this strange problem. When issuing the "w" or "who" command, the system produce no listing. See screen shot below. ----------------------- $ w 2:56pm up 2 day(s), 21:10, 0 users, load average: 1.03, 0.75, 0.69 User tty ... (6 Replies)
Discussion started by: sinyem
6 Replies

9. UNIX for Dummies Questions & Answers

command help, how do i list the users of a group?

What command allows you to display a list of the userids of all the other users in a group, regardless if they are logged in or not? (3 Replies)
Discussion started by: crabtruck
3 Replies

10. UNIX for Advanced & Expert Users

Admin of Users from command line

I have been adding new users on a system(SOLARIS 8), and one of these 'nice'(?) users has got back to me to complain that his full name isnt showing up when he does the following at the command prompt : $ finger <login_id> You see when I added the users details at the command line using... (2 Replies)
Discussion started by: Kanu77
2 Replies
Login or Register to Ask a Question