Chgrp
From DssWiki
{{DISPLAYTITLE:{{#if:|:|}}chgrp}}
The chgrp command is used by unprivileged users on Unix-like systems to change the group associated with a file. Unlike the chown command, chgrp allows regular users to change groups, but only to one of which they are a member.
Contents |
[edit] Usage
The general syntax of the chgrp command is:
chgrp group target1 [target2 ..]
- The group parameter indicates the new group with which the targets should be associated.
- The target1 parameter indicates the files or directories for which the change should be made.
- The target2 parameter indicates optional additional files or directories for which the change should be made.
Footnote: The group parameter may either be a symbolic name or an identifier.
[edit] Usage example
$ls -l ttt -rw-r--r-- 1 gbeeker staff 545 Nov 04 2004 ttt $chgrp system ttt $ls -l ttt -rw-r--r-- 1 gbeeker system 545 Nov 04 2004 ttt
The above command changes the group associated with ttt to 'system', provided the executing user is a member of that group.
[edit] See also
[edit] External links
|SUS|default}}|cu|chgrp|url}} chgrp{{#if:{{Man/{{#if:SUS |SUS|default}}|cu|chgrp|display_section}}|({{Man/{{#if:SUS |SUS|default}}|cu|chgrp|display_section}})}}]{{#if:change the file group ownership|: change the file group ownership}}{{#if:{{#ifeq: |inline||{{Man/{{#if:SUS |SUS|default}}|cu|chgrp|attrib}}}}| – {{#ifeq: |inline||{{Man/{{#if:SUS |SUS|default}}|cu|chgrp|attrib}}}}}}
||default}}|1|chgrp|url}} chgrp{{#if:{{Man/{{#if: ||default}}|1|chgrp|display_section}}|({{Man/{{#if: ||default}}|1|chgrp|display_section}})}}]{{#if:change group ownership|: change group ownership}}{{#if:{{#ifeq: |inline||{{Man/{{#if: ||default}}|1|chgrp|attrib}}}}| – {{#ifeq: |inline||{{Man/{{#if: ||default}}|1|chgrp|attrib}}}}}}
{{#if: |
Unix command line programs and builtins (more) | |||
| File and file system management: | cat | chattr | cd | chmod | chown | chgrp | cksum | cmp | cp | du | df | file | fsck | fuser | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
| Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
| User Management/Environment: | env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write | ||
| Text processing: | awk | comm | cut | ed | ex | fmt | head | iconv | join | less | more | paste | pg | sed | sort | tac | tail | tr | uniq | wc | xargs | ||
| Shell programming: | basename | echo | expr | false | printf | test | true | unset | Printing: | lp |
| Communications: inetd | netstat | ping | rlogin | traceroute | Searching: find | grep | strings | Miscellaneous: banner | bc | cal | dd | man | size | yes | |
