O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

who

Synopsis

who [options] [file]

Displays information about the current status of the system. With no options, lists the names of users currently logged into the system. An optional system file (default is /var/run/utmp) can be supplied to give additional information. who is usually invoked without options, but useful options include am i and -u. For more examples, see cut , line, paste , tee , and wc .

Options

-H

Print headings.

-m

Report only about the current terminal.

=q

List names and number of users in columns.

-T

Report whether terminals are writable (+), not writable (-), or unknown (?).

-u

Report terminal usage (idle time). A dot (.) means less than one minute idle; old means more than 24 hours idle.

am i

Print the username of the invoking user. (Similar to results from id.)

Example

This sample output was produced at 1:55 p.m. on January 15:

$ who -uH
USER     LINE     WHEN         IDLE     FROM
chuck    console  Jan 14 19:55 18:01
chuck    ttyp1    Jan 15 13:11   .
chuck    ttyp2    Jan 15 13:55   .

The output shows that the user chuck has been idle for 18 hours and 1 minute (18:01, under the IDLE column).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required