From e1a8a590e16f4d3aee6fdf4e43e31e976ca772ba Mon Sep 17 00:00:00 2001 From: Hayden Schiff Date: Mon, 22 Feb 2016 15:03:35 -0500 Subject: [PATCH 1/2] chgrp: add page --- pages/common/chgrp.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/chgrp.md diff --git a/pages/common/chgrp.md b/pages/common/chgrp.md new file mode 100644 index 000000000..f6f907cbc --- /dev/null +++ b/pages/common/chgrp.md @@ -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}} From 3d6ae2325f5f1f8ef03e71f3309808aeefea9d21 Mon Sep 17 00:00:00 2001 From: Hayden Schiff Date: Mon, 22 Feb 2016 15:07:35 -0500 Subject: [PATCH 2/2] chown: tweaks for parity with chgrp.md --- pages/common/chown.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/common/chown.md b/pages/common/chown.md index 1d2df155b..4cc261c41 100644 --- a/pages/common/chown.md +++ b/pages/common/chown.md @@ -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}}`