GETGRGID
Section: User Commands (1)
Updated: LOCAL
Index
Return to Main Contents
NAME
getgrgid - Group information from group numeric id
SYNOPSIS
getgrgid
[-Iagmnpv]
[-d
char
]
[-e
char
]
[ grpnum ... ]
DESCRIPTION
getgrgid
echoes group information given a list of group numeric identifiers.
Error messages generated from within the
getgrgid
utility are sent to stderr, not stdout, allowing the programmer to use
appropriate backquoting for this command.
If no arguments are given, the current effective group is assumed.
USAGE
Options
- -I
-
Gives information about the program.
- -a
-
Same as setting npgm flags. See below.
- -g
-
Will echo group identifier (gid).
- -n
-
Will echo group name.
- -m
-
Will echo group member list.
- -p
-
Will echo group encrypted password.
- -r
-
Will report on exceptions to standard error, for example when groups are
not found.
- -v
-
True if the command is to work in verbose mode, not suitable for
backquoting and echoing more information to standard output or standard
error.
- -d
-
The character following the option indication is used as a delimiter
between output fields. The default is ':' in line with the format of
the /etc/group file.
- -e
-
The character following the option indication is used as a delimiter
between member fields. The default is ',' in line with the format of
the /etc/group file.
- -?
-
Presents brief help text to the user. This option causes an error to
be returned as no group number is echoed.
EXAMPLE
example$ getgrgid -a
cmim::208:cmim,dtb,asd,rhs,marg,mah,sab,yxn,spl,krf,gxf
example$ getgrgid -rvgn 1 2 6 7
getgrgid: could not find group 7
gname=other:gid=1
gname=bin:gid=2
gname=mail:gid=6
example$ getgrgid -nm -d +
cmim+cmim,dtb,asd,rhs,marg,mah,sab,yxn,spl,krf,gxf
example$ getgrgid -vgn -d +
gname=cmim+gid=208
DIAGNOSTICS
The following values may be returned to the calling process:
-
- 0
-
No errors noted
- 1
-
Returned when the group information is not available.
- 12
-
ENOMEM: Problem with memory.
- 22
-
EINVAL: Invalid argument supplied.
FILES
/etc/group
SEE ALSO
group(4)
getegid(2)
getgrgid(2)
getgrnam(1L)
AUTHOR
David T. Bath dtb@otto.bf.rmit.oz.au
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- USAGE
-
- Options
-
- EXAMPLE
-
- DIAGNOSTICS
-
- FILES
-
- SEE ALSO
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 06:26:57 GMT, December 12, 2024