1# chgrp
2
3
4## Command Function
5
6This command is used to change the file group.
7
8
9## Syntax
10
11chgrp [_group_] [_pathname_]
12
13
14## Parameters
15
16**Table 1** Parameter description
17
18| Parameter    | Description  | Value Range      |
19| -------- | ---------- | -------------- |
20| group    | Specifies the target file group.| [0, 0xFFFFFFFF] |
21| pathname | Specifies the file path. | An existing file |
22
23
24## Usage Guidelines
25
26- Specify **group** to change the file group.
27- For the FAT file system, this command cannot be used to change user group IDs.
28
29## Note
30
31Currently, the shell does not support this command.
32
33## Example
34
35Run **chgrp 100 testfile**.
36
37
38## Output
39
40Change the group ID of the **testfile** file in the **dev/** directory to **100**.
41
42```
43OHOS:/dev$ ll testfile
44-rw-r--r-- 0 0 0 0 1970-01-01 00:00 testfile
45OHOS:/dev$ chgrp 100 testfile
46OHOS:/dev$ ll testfile
47-rw-r--r-- 0 0 100 0 1970-01-01 00:00 testfile
48OHOS:/dev$
49```
50