Skip to content

Commit fbb33b5

Browse files
authored
chgrp, chown: refer to each other and add example (#19793)
1 parent c2b130e commit fbb33b5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

pages/common/chgrp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# chgrp
22

33
> Change group ownership of files and directories.
4+
> See also: `chown`.
45
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/chgrp-invocation.html>.
56
67
- Change the owner group of a file/directory:

pages/common/chown.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# chown
22

33
> Change user and group ownership of files and directories.
4+
> See also: `chgrp`.
45
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/chown-invocation.html>.
56
67
- Change the owner user of a file/directory:
@@ -15,6 +16,10 @@
1516

1617
`sudo chown {{user}}: {{path/to/file_or_directory}}`
1718

19+
- Change the group of a file to a group that the current user belongs to:
20+
21+
`chown :{{group}} {{path/to/file_or_directory}}`
22+
1823
- Recursively change the owner of a directory and its contents:
1924

2025
`sudo chown {{[-R|--recursive]}} {{user}} {{path/to/directory}}`

0 commit comments

Comments
 (0)