API to translate group name to group id (gid)

API to translate group name to group id (gid)

File.chown takes an owner ID, a group ID (gid), and a filename. I want to use it to set a file's gid, but what I have is the group name. Is there anything in the standard library that I can use to translate a group name into a gid?

plug-in architecture based c/c++ application


How do I rename a process on Linux?
I'm not overly familiar with ruby, although the Linux syscall for this is struct group* receive grnam(const char* name) And is obtained from the /etc/group file.. Why does mmap() fail with ENOMEM on a 1TB sparse file? According to this site you must find this functionality in the Etc module:. Library for parsing arguments GNU-style? [closed]
Etc.receive grnam(‘users’) ->      #<struct Struct::Group              name="users",              passwd="x",              gid=100,              mem=["meta", "root"]>  
Setup SVN/LAMP/Test Server/ on linux, where to start?

74 out of 100 based on 39 user ratings 234 reviews