1SG(1) User Commands SG(1)
2
3
4
6 sg - execute command as different group ID
7
9 sg [-] [group [-c ] command]
10
12 The sg command works similar to newgrp but accepts a command. The
13 command will be executed with the /bin/sh shell. With most shells you
14 may run sg from, you need to enclose multi-word commands in quotes.
15 Another difference between newgrp and sg is that some shells treat
16 newgrp specially, replacing themselves with a new instance of a shell
17 that newgrp creates. This doesn't happen with sg, so upon exit from a
18 sg command you are returned to your previous group ID.
19
21 /etc/passwd
22 User account information.
23
24 /etc/shadow
25 Secure user account information.
26
27 /etc/group
28 Group account information.
29
30 /etc/gshadow
31 Secure group account information.
32
34 id(1), login(1), newgrp(1), su(1), gpasswd(1), group(5), gshadow(5)
35
36
37
38User Commands 07/30/2006 SG(1)