1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-01 07:17:56 +01:00

Merge pull request #783 from oxguy3/patch-2

Add chgrp (and tweak chown to match)
This commit is contained in:
Igor Shubovych 2016-02-23 03:52:10 +02:00
commit 81bda40ce3
2 changed files with 25 additions and 6 deletions

19
pages/common/chgrp.md Normal file
View file

@ -0,0 +1,19 @@
# chgrp
> Change group ownership of files and folders.
- Change the owner of a file/folder:
`chgrp {{group}} {{path/to/file}}`
- Recursively change the owner of a folder and its contents:
`chgrp -R {{group}} {{path/to/folder}}`
- Change the owner of a symbolic link:
`chgrp -h {{user}} {{path/to/symlink}}`
- Change the owner of a file/folder to match a reference file:
`chgrp --reference={{path/to/reference_file}} {{path/to/file}}

View file

@ -1,16 +1,16 @@
# chown
> Change the owning user/group of the specified files.
> Change user and group ownership of files and folders.
- Change the user of a file:
- Change the owner user of a file/folder
`chown {{user}} {{path/to/file}}`
- Change the user and group of a file:
- Change the owner user and group of a file/folder:
`chown {{user}}:{{group}} {{path/to/file}}`
- Recursively change the owner of an entire folder:
- Recursively change the owner of a folder and its contents
`chown -R {{user}} {{path/to/folder}}`
@ -18,6 +18,6 @@
`chown -h {{user}} {{path/to/symlink}}`
- Use the owner and group of a reference file and apply those values to another file:
- Change the owner of a file/folder to match a reference file:
`chown --reference={{reference-file}} {{path/to/file}}`
`chown --reference={{path/to/reference_file}} {{path/to/file}}`