The newgrp Command

   

Korn Shell: Unix and Linux Programming Manual, Third Edition, The
By Anatole Olczak

Table of Contents
Chapter 9.  Miscellaneous Commands


The newgrp Command

The newgrp command changes the group id and is equivalent to 'exec /bin/newgrp group'. In this example, the group id is changed from users to networks:

 $ id  uid=100(anatole) gid=101(users)  $ newgrp networks  uid=100(anatole) gid=12(networks) 

Without arguments, newgrp resets the group-id to the default:

 $ newgrp  uid=100(anatole) gid=101(users) 

       
    Top
     



    Korn Shell. Unix and Linux Programming Manual, Third Edition
    Korn Shell. Unix and Linux Programming Manual, Third Edition
    ISBN: N/A
    EAN: N/A
    Year: 2000
    Pages: 177

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net