Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Linux / Unix chgrp command

Quick links

About chgrp
Syntax
Examples
Linux / Unix main page

About chgrp

For system V, changes the group that has access to a file or directory.

Syntax

chgrp newgroup filenames [-f] [-h]

newgroup Specifies the new group that you wish to allow access to.
filenames Specifies the files that the newgroup has access to.
-f Force. Do not report errors.
-h If the file is a symbolic link, change the group of the symbolic link. Without this option, the group of the file referenced by the symbolic link is changed.
-R Recursive. chgrp descends through the directory, and any subdirectories, setting the specified group ID as it proceeds. When a symbolic link is encountered, the group of the target file is changed (unless the -h option is specified), but no recursion takes place.

Examples

chgrp hope file.txt - Would change the group to hope for the file file.txt if present and the group hope is valid.

Related commands

chmod
chown
id

Index

Category:
Linux / Unix

Companies:
Click here

Related Pages:

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope