ID(1M-SysV) RISC/os Reference Manual ID(1M-SysV)
NAME
id, whoami - print user and group IDs and names
SYNOPSIS
id [ +format ]
whoami
DESCRIPTION
By default, id prints a message of the form
uid=userid(username) gid=groupid(groupname)
If the effective userid is different from the real userid,
the ``uid'' portion of the message is followed by
euid=userid(username)
A different effective groupid is handled similarly.
A format argument may be given to specify exactly what items
should be printed. The format may contain a combination of
C-like escape sequences (\n, \r, \f, \b, \f, and \\), %-
specifiers (see below), and other characters, and is printed
with a following newline.
The available %-specifiers are:
%% %
%u userid number
%U effective userid number
%g groupid number
%G effective groupid number
%l username
%L effective username
%n groupname
%N effective groupname
The command whoami is equivalent to giving the format
``+%l'', and is provided for BSD compatability.
SEE ALSO
logname(1), getuid(2).
Printed 1/15/91 Page 1