Contidos dentroLocalizar Mais DocumentaçãoDestaques de Recursos de Suporte | Fazer download desta apostila em PDF (8966 KB)
id(1M)Name | Synopsis | Description | Options | Operands | Environment Variables | Exit Status | Attributes | See Also | Notes Name
Synopsis/usr/bin/id [-p] [user] /usr/bin/id -a [-p] [user] /usr/xpg4/bin/id [-p] [user] /usr/xpg4/bin/id -G [-n] [user] /usr/xpg4/bin/id -g [-nr] [user] /usr/xpg4/bin/id -u [-nr] [user] DescriptionIf no user operand is provided, the id utility writes the user and group IDs and the corresponding user and group names of the invoking process to standard output. If the effective and real IDs do not match, both are written. If multiple groups are supported by the underlying system, /usr/xpg4/bin/id also writes the supplementary group affiliations of the invoking process. If a user operand is provided and the process has the appropriate privileges, the user and group IDs of the selected user are written. In this case, effective IDs are assumed to be identical to real IDs. If the selected user has more than one allowable group membership listed in the group database, /usr/xpg4/bin/id writes them in the same manner as the supplementary groups described in the preceding paragraph. FormatsThe following formats are used when the LC_MESSAGES locale category specifies the "C" locale. In other locales, the strings uid, gid, euid, egid, and groups may be replaced with more appropriate strings corresponding to the locale.
If the effective and real user IDs do not match, the following are inserted immediately before the \n character in the previous format:
with the following arguments added at the end of the argument list:
If the effective and real group IDs do not match, the following is inserted directly before the \n character in the format string (and after any addition resulting from the effective and real user IDs not matching):
with the following arguments added at the end of the argument list:
If the process has supplementary group affiliations or the selected user is allowed to belong to multiple groups, the first is added directly before the NEWLINE character in the format string:
with the following arguments added at the end of the argument list:
and the necessary number of the following added after that for any remaining supplementary group IDs:
and the necessary number of the following arguments added at the end of the argument list:
If any of the user ID, group ID, effective user ID, effective group ID or supplementary/multiple group IDs cannot be mapped by the system into printable user or group names, the corresponding (%s) and name argument is omitted from the corresponding format string. When any of the options are specified, the output format is as described under OPTIONS. Options
The following option is supported by both /usr/bin/id and /usr/xpg4/bin/id. For /usr/xpg4/bin/id, -p is invalid if specified with any of the -G, -g, or -u options. /usr/bin/idThe following option is supported for /usr/bin/id only: /usr/xpg4/bin/idThe following options are supported for /usr/xpg4/bin/id only: Operands
The following operand is supported: Environment VariablesSee environ(5) for descriptions of the following environment variables that affect the execution of id: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. Exit StatusAttributesSee attributes(5) for descriptions of the following attributes: /usr/bin/id/usr/xpg4/bin/idSee Alsofold(1), logname(1), who(1), getgid(2), getgroups(2), getprojid(2), getuid(2), attributes(5), environ(5), standards(5) NotesOutput produced by the -G option and by the default case could potentially produce very long lines on systems that support large numbers of supplementary groups. Name | Synopsis | Description | Options | Operands | Environment Variables | Exit Status | Attributes | See Also | Notes |
|||||||||||