From 4f9b1b9804b2427ebe99cd8f79ff17fd22570957 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 9 Dec 1999 16:09:31 +0000 Subject: zsh-workers/8982 --- Doc/Zsh/mod_files.yo | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'Doc') diff --git a/Doc/Zsh/mod_files.yo b/Doc/Zsh/mod_files.yo index 932d8583c..356696faa 100644 --- a/Doc/Zsh/mod_files.yo +++ b/Doc/Zsh/mod_files.yo @@ -4,6 +4,43 @@ cindex(files, manipulating) The tt(files) module makes some standard commands available as builtins: startitem() +findex(chgrp) +item(tt(chgrp) [ tt(-Rs) ] var(group) var(filename) ...)( +Changes group of files specified. This is equivalent to tt(chown) with +a var(user-spec) argument of `tt(:)var(group)'. +) +findex(chown) +item(tt(chown) [ tt(-Rs) ] var(user-spec) var(filename) ...)( +Changes ownership and group of files specified. + +The var(user-spec) can be in four forms: + +startsitem() +sitem(var(user))(change owner to var(user); do not change group) +sitem(var(user)tt(:))(change owner to var(user); change group to var(user)'s primary group) +sitem(var(user)tt(:)var(group))(change owner to var(user); change group to var(group)) +sitem(tt(:)var(group))(do not change owner; change group to var(group)) +endsitem() + +In each case, the `tt(:)' may instead be a `tt(.)'. +Each of var(user) and var(group) may be either a username (or group name, as +appropriate) or a decimal user ID (group ID). Interpretation as a name +takes precedence, if there is an all-numeric username (or group name). + +The tt(-R) option causes tt(chown) to recursively descend into directories, +changing the ownership of all files in the directory after +changing the ownership of the directory itself. + +The tt(-s) option is a zsh extension to tt(chown) functionality. It enables +paranoid behaviour, intended to avoid security problems involving +a tt(chown) being tricked into affecting files other than the ones +intended. It will refuse to follow symbolic links, so that (for example) +``tt(chown luser /tmp/foo/passwd)'' can't accidentally chown tt(/etc/passwd) +if tt(/tmp/foo) happens to be a link to tt(/etc). It will also check +where it is after leaving directories, so that a recursive chown of +a deep directory tree can't end up recursively chowning tt(/usr) as +a result of directories being moved up the tree. +) findex(ln) xitem(tt(ln) [ tt(-dfis) ] var(filename) var(dest)) item(tt(ln) [ tt(-dfis) ] var(filename) ... var(dir))( -- cgit 1.4.1