WHO(1) General Commands Manual WHO(1)NAME
who - print list of currently logged in users
SYNOPSIS
who [file]
EXAMPLES
who # Print user names, terminals and times
DESCRIPTION
Who prints a list of currently logged in users. For each one, the user name, terminal, and login time is printed. This program gets its
information from the file /etc/utmp, which is updated by init and login. If the file does not exist, neither of these will create it, and
who will not work. Note that if you decide to create an empty /usr/adm/wtmp to enable the login accounting, it will grow forever and even-
tually fill up your disk unless you manually truncate it from time to time. If an optional file name is provided, the logins in that file
will be printed.
SEE ALSO utmp(5).
WHO(1)
Check Out this Related Man Page
UTMP(5) File Formats Manual UTMP(5)NAME
utmp, wtmp - logged in users, login and logout history
SYNOPSIS
#include <sys/types.h>
#include <utmp.h>
DESCRIPTION
The files /etc/utmp and /usr/adm/wtmp respectively contain the currently logged in users, and the history of logins and logouts.
Each file is an array of the following structure defined in <utmp.h>:
struct utmp {
char ut_user[8]; /* user name */
char ut_line[12]; /* terminal name */
char ut_host[16]; /* host name, when remote */
time_t ut_time; /* login/logout time */
};
#define ut_name ut_user/* for compatibility with other systems */
The structure contains more fields than those listed, but they are only of interest to init and login. Note that the ut_name field is a
compatibility alias for ut_user, it is actually better to use it.
A login entry is completely specified. A logout entry has a null string for ut_name. A shutdown or reboot entry has an ut_line field con-
taining a "~" (tilde). The ut_name field is usually the name of the program that did the shutdown, or "reboot" at reboot. This is a bit
confusing, but note that there should always be two such entries. If you see just one entry then the system has crashed, if you see two
entries then the system was properly shut down and later rebooted.
FILES
/etc/utmp Currently logged in users.
/usr/adm/wtmp History of logins and logouts.
SEE ALSO who(1), ttyslot(3).
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
UTMP(5)
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)
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)
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)
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)
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)
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)