
{"id":18551,"date":"2009-12-08T14:25:54","date_gmt":"2009-12-08T08:55:54","guid":{"rendered":"http:\/\/froisa.com\/?p=99"},"modified":"2009-12-08T14:25:54","modified_gmt":"2009-12-08T08:55:54","slug":"hacking-with-the-groups-gnu-command","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2009\/12\/08\/hacking-with-the-groups-gnu-command\/","title":{"rendered":"Hacking with the &#8220;groups&#8221;  GNU command"},"content":{"rendered":"<pre>\n20.4 `groups': Print group names a user is in\n=============================================\n\n`groups' prints the names of the primary and any supplementary groups\nfor each given USERNAME, or the current process if no names are given.\nIf more than one name is given, the name of each user is printed before\nthe list of that user's groups and the user name is separated from the\ngroup list by a colon.  Synopsis:\n\n     groups [USERNAME]...\n\n   The group lists are equivalent to the output of the command `id -Gn'.\n\n   The only options are `--help' and `--version'.  *Note Common\noptions::.\n\n   Primary and supplementary groups for a process are normally inherited\nfrom its parent and are usually unchanged since login.  This means that\nif you change the group database after logging in, `groups' will not\nreflect your changes within your existing login session.  Running\n`groups' with a list of users causes the user and group database to be\nconsulted afresh, and so will give a different result.\n\n   An exit status of zero indicates success, and a nonzero value\nindicates failure.\n\nsource: http:\/\/www.gnu.org\/software\/coreutils\/manual\/coreutils.txt\n<\/pre>\n<pre>\n$groups \njeffrin cdrom floppy audio dip video plugdev\n$groups --help\nUsage: groups [OPTION]... [USERNAME]...\nPrint group memberships for each USERNAME or, if no USERNAME is specified, for\nthe current process (which may differ if the groups database has changed).\n      --help     display this help and exit\n      --version  output version information and exit\n\nGNU coreutils online help: \nFull documentation at: \nor available locally via: info '(coreutils) groups invocation'\n$groups cdrom\ngroups: cdrom: no such user\n$groups jeffrin\njeffrin : jeffrin cdrom floppy audio dip video plugdev\n$groups root\nroot : root\n$groups daemon\ndaemon : daemon\n$groups nobody\nnobody : nogroup\n$groups messagebus\nmessagebus : messagebus\n$groups colord\ncolord : colord\n$groups hack\ngroups: hack: no such user\n$groups mail\nmail : mail\n$groups man\nman : man\n$\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>20.4 `groups&#8217;: Print group names a user is in ============================================= `groups&#8217; prints the names of the primary and any supplementary groups for each given USERNAME, or the current process if no names are given. If more than one name is given, the name of each user is printed before the list of that user&#8217;s groups &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2009\/12\/08\/hacking-with-the-groups-gnu-command\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hacking with the &#8220;groups&#8221;  GNU command&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2059,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[870],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18551"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=18551"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18551\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media\/2059"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=18551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=18551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=18551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}