- chgrp
-
The chgrp (from change group) command is used by unprivileged users on Unix-like systems to change the group associated with a computer file. Unlike the chown command, chgrp allows regular users to change groups, but only to one of which they are a member.
Contents
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. It may either be a symbolic name or an identifier.
- 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.
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 directory ttt to 'system', provided the executing user is a member of that group.
See also
- chown
- Group identifier (Unix)
- List of Unix programs
External links
- The Single UNIX® Specification, Issue 7 from The Open Group : change the file group ownership – Commands & Utilities Reference,
- Linux User Commands Manual : change group ownership –
Unix command-line interface programs and shell builtins (more) File system Processes User environment Text processing Shell builtins Networking Searching Documentation Miscellaneous List of Unix utilities Categories:- Operating system security
- Standard Unix programs
- Unix SUS2008 utilities
Wikimedia Foundation. 2010.