Skip to content
class method

Etc.getgrnam

(::String name) -> ::Etc::Group
getgrnam(name) → Etc::Group

Returns information about the group with specified name, as found in /etc/group.

The information is returned as a Group struct.

See the unix manpage for getgrnam(3) for more detail.

Example:

Example
Etc.getgrnam('users')
#=> #<struct Etc::Group name="users", passwd="x", gid=100, mem=["meta", "root"]>
See also .getgrgid .getlogin .getgrent .getpwent also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0