Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

who(1) [v7 man page]

WHO(1)							      General Commands Manual							    WHO(1)

NAME
who - who is on the system SYNOPSIS
who [ who-file ] [ am I ] DESCRIPTION
Who, without an argument, lists the login name, terminal name, and login time for each current UNIX user. Without an argument, who examines the /etc/utmp file to obtain its information. If a file is given, that file is examined. Typically the given file will be /usr/adm/wtmp, which contains a record of all the logins since it was created. Then who lists logins, logouts, and crashes since the creation of the wtmp file. Each login is listed with user name, terminal name (with `/dev/' suppressed), and date and time. When an argument is given, logouts produce a similar line without a user name. Reboots produce a line with `x' in the place of the device name, and a fossil time indicative of when the system went down. With two arguments, as in `who am I' (and also `who are you'), who tells who you are logged in as. FILES
/etc/utmp SEE ALSO
getuid(2), utmp(5) WHO(1)

Check Out this Related Man Page

utmp(5) 							File Formats Manual							   utmp(5)

Name
       utmp, wtmp - login records

Syntax
       #include <utmp.h>

Description
       The  file  records  information	about  who  is currently using the system.  The file is a sequence of entries with the following structure
       declared in the include file:
       struct utmp {
	       char    ut_line[8];	       /* tty name */
	       char    ut_name[8];	       /* user id */
	       char    ut_host[16];	       /* host name, if remote */
	       long    ut_time; 	       /* time on */
       };

       This structure gives the name of the special file associated with the user's terminal, the user's login name, and the time of the login	in
       the form of

       The  file  records  all	logins and logouts.  A null user name indicates a logout on the associated terminal.  A terminal referenced with a
       tilde (~) indicates that the system was rebooted at the indicated time.	The adjacent pair of entries with terminal names referenced  by  a
       vertical  bar  (|)  or  a right brace (}) indicate the system-maintained time just before and just after a command has changed the system's
       timeframe.

       The file is maintained by and Neither of these programs creates the file, so, if it is removed, record-keeping is turned off.  It is summa-
       rized by

Files
See Also
       last(1), lastcomm(1), login(1), who(1), ac(8), init(8)

																	   utmp(5)
Man Page

6 More Discussions You Might Find Interesting

1. HP-UX

get whole command arguments in ps -ef?

Hello All, I want to build some monitoring of processes in HP-UX 11.x. Is there any way to get the whole set of commands and arguments instead of the first 60 characters? I read that there's a limitation of the ps -ef command that we can't overcome. In this case is there any other command... (17 Replies)
Discussion started by: usfrog
17 Replies

2. Programming

Writing c code for who | sort | lp

Hi, Can any one please let me know the code for implementing who | sort | lp Basically I want to implent pipe here. The program can use the existing who, sort and lp Also please let me know How many processes are created in Unix when the following commands are executed? $ ls... (17 Replies)
Discussion started by: yeheyaansari
17 Replies

3. Shell Programming and Scripting

search and replace the whole line

Hi, I have this line in a file called test.cfg SOURCEFILE=/usr/platform/sun4v/driver/file.cfg But i have many occurances of "SOURCEFILE" in test.cfg , i need to search only for this line and replace that line with SOURCEFILE=/usr/platform/sun4x/driver/file.cfg again there are many... (17 Replies)
Discussion started by: Jartan
17 Replies

4. Shell Programming and Scripting

Running "who am i" on sol 8

Hi All I have a ksh script, which is run as the root user. At some point in the script, it needs to check for the user that is running the script. ( The real user that su to root). This is on a sol 8 server, but it displays the user as root instead of my username. root@host-1 # who am i |... (19 Replies)
Discussion started by: wisdom
19 Replies

5. Shell Programming and Scripting

Match a line in File 1 with Column in File 2 and print whole line in file 2 when matched

Hi Experts, I am very new to scripting and have a prb since few days and it is urgent to solve so much appreciated if u help me. i have 2 files file1.txt 9647810043118 9647810043126 9647810043155 9647810043161 9647810043166 9647810043185 9647810043200 9647810043203 9647810043250... (22 Replies)
Discussion started by: mustafa.abdulsa
22 Replies

6. Ubuntu

dd cloning of whole disk

I am using 'dd' to clone an entire hard drive which only has Ubuntu 11.10 and some data with no special options. The disks are both 1Tb, However, I did re-partition the target disk with gparted successfully. The new partions are not the same size as the source disk. When starting 'dd' no partitions... (24 Replies)
Discussion started by: Royalist
24 Replies