chgrp, chown: refer to each other and add example (#19793)

This commit is contained in:
Managor
2025-12-08 05:54:28 +02:00
committed by GitHub
parent c2b130e59d
commit fbb33b5c28
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -1,6 +1,7 @@
# chgrp
> Change group ownership of files and directories.
> See also: `chown`.
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/chgrp-invocation.html>.
- Change the owner group of a file/directory:
+5
View File
@@ -1,6 +1,7 @@
# chown
> Change user and group ownership of files and directories.
> See also: `chgrp`.
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/chown-invocation.html>.
- Change the owner user of a file/directory:
@@ -15,6 +16,10 @@
`sudo chown {{user}}: {{path/to/file_or_directory}}`
- Change the group of a file to a group that the current user belongs to:
`chown :{{group}} {{path/to/file_or_directory}}`
- Recursively change the owner of a directory and its contents:
`sudo chown {{[-R|--recursive]}} {{user}} {{path/to/directory}}`