[英]Linux Function to write group entry into /etc/group
While going through the code of an application, i came across the putpwent()
function which writes a password entry
. 在浏览应用程序的代码时,我遇到了
putpwent()
函数,该函数编写了一个password entry
。 Is there a function similar to this which writes a group entry
into a file. 是否有与此类似的功能,可将
group entry
写入文件。
putgrent()
将做您想要的。
man 3 putgrent
: man 3 putgrent
:
putgrent - write a group database entry to a file putgrent-将组数据库条目写入文件
将'pw'替换为'gr': http : //www.kernel.org/doc/man-pages/online/pages/man3/putgrent.3.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.