getgrent.3
来自「unix v7是最后一个广泛发布的研究型UNIX版本」· 3 代码 · 共 94 行
3
94 行
.TH GETGRENT 3 .SH NAMEgetgrent, getgrgid, getgrnam, setgrent, endgrent \- get group file entry.SH SYNOPSIS.B #include <grp.h>.PP.B struct group *getgrent();.PP.B struct group *getgrgid(gid) int gid;.PP.B struct group *getgrnam(name) char *name;.PP.B int setgrent();.PP.B int endgrent();.SH DESCRIPTION.I Getgrent,.I getgrgidand.I getgrnameach return pointersto an objectwith the following structurecontaining the broken-outfields of a line in the group file..RS.PP.nf.so /usr/include/grp.h.fi.RE.PPThe members of this structure are:.TPgr_nameThe name of the group..br.ns.TPgr_passwdThe encrypted password of the group..br.ns.TPgr_gidThe numerical group-ID..br.ns.TPgr_memNull-terminated vectorof pointers to the individualmember names..PP.I Getgrentsimply reads the nextline while.I getgrgidand.I getgrnamsearch until a matching.I gidor.I nameis found(or until EOF is encountered).Each routine picks upwhere the others leave offso successive calls may be usedto search the entire file..PPA call to.I setgrenthas the effect of rewindingthe group fileto allowrepeated searches..I Endgrentmay be called toclose the group filewhen processing is complete..SH FILES/etc/group.SH "SEE ALSO"getlogin(3), getpwent(3), group(5).SH DIAGNOSTICSA null pointer(0) is returned on EOF or error..SH BUGSAll informationis contained in a static areaso it must be copied if it isto be saved.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?