mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-29 04:21:03 +08:00
chgrp, chown: refer to each other and add example (#19793)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
Reference in New Issue
Block a user