ug_display_width(3C)ug_display_width(3C)NAME
ug_display_width() - get current display width for user and group names
SYNOPSIS DESCRIPTION
The function returns the current display width for user and group names. This value determines how many bytes of a user or group name that
system and conforming applications will display.
On a system with long user and group names enabled, the default display width for the system is set with the command (see lugadmin(1M)).
Users can override the default value by setting the environment variable to an integer value in the range to
Application Usage
System and conforming applications use the return value (current display width) for formatted output as follows:
Long user and group names are not configured on the system.
Display user and group names as per default settings.
Long user and group name are enabled but display user and group names
as per default settings. For user and group names longer (in bytes) than the default allowable length, truncate the
name to the maximum default length and replace the last printed character with a plus sign
If the name is longer (in bytes) than the current display width,
truncate the name to this length (in bytes) and replace the last printed character with a plus sign
EXTERNAL INFLUENCES
Environment Variables
If it is set and long user and group names are enabled,
it overrides the width that is specified by the command for all system and conforming applications that write formatted output.
RETURN VALUE
returns one of the following values:
Long user and group names are not enabled, or an internal error occurred.
Long user and group names are enabled but set to default value.
The current display width for long user and group names.
WARNINGS
It is recommended that you do not modify the file directly. Doing so could cause incorrect behavior.
FILES
If this file is present,
the system is enabled for long user and group names; otherwise, it is not. This file contains the default display width, as set
with the command.
SEE ALSO lugadmin(1M).
ug_display_width(3C)
Check Out this Related Man Page
ID(1) BSD General Commands Manual ID(1)NAME
id -- return user identity
SYNOPSIS
id [user]
id -G [-n] [user]
id -g [-nr] [user]
id -p [user]
id -u [-nr] [user]
DESCRIPTION
The id utility displays the user and group names and numeric IDs, of the calling process, to the standard output. If the real and effective
IDs are different, both are displayed, otherwise only the real ID is displayed.
If a user (login name or user ID) is specified, the user and group IDs of that user are displayed. In this case, the real and effective IDs
are assumed to be the same.
The options are as follows:
-G Display the different group IDs (effective, real and supplementary) as white-space separated numbers, in no particular order.
-g Display the effective group ID as a number.
-n Display the name of the user or group ID for the -G, -g and -u options instead of the number. If any of the ID numbers cannot be
mapped into names, the number will be displayed as usual.
-p Make the output human-readable. If the user name returned by getlogin(2) is different from the login name referenced by the user ID,
the name returned by getlogin(2) is displayed, preceded by the keyword ``login''. The user ID as a name is displayed, preceded by
the keyword ``uid''. If the effective user ID is different from the real user ID, the real user ID is displayed as a name, preceded
by the keyword ``euid''. If the effective group ID is different from the real group ID, the real group ID is displayed as a name,
preceded by the keyword ``rgid''. The list of groups to which the user belongs is then displayed as names, preceded by the keyword
``groups''. Each display is on a separate line.
-r Display the real ID for the -g and -u options instead of the effective ID.
-u Display the effective user ID as a number.
The id utility exits 0 on success, and >0 if an error occurs.
SEE ALSO who(1)STANDARDS
The id function is expected to conform to IEEE Std 1003.2 (``POSIX.2'').
HISTORY
The historic groups(1) command is equivalent to ``id -Gn [user]''.
The historic whoami(1) command is equivalent to ``id -un''.
The id command first appeared in 4.4BSD.
BSD May 5, 1994 BSD