summaryrefslogtreecommitdiff
path: root/Doc/Zsh/mod_files.yo
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/Zsh/mod_files.yo')
-rw-r--r--Doc/Zsh/mod_files.yo34
1 files changed, 27 insertions, 7 deletions
diff --git a/Doc/Zsh/mod_files.yo b/Doc/Zsh/mod_files.yo
index 90e988474..9f9634c86 100644
--- a/Doc/Zsh/mod_files.yo
+++ b/Doc/Zsh/mod_files.yo
@@ -23,6 +23,26 @@ item(tt(chgrp) [ tt(-hRs) ] 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(chmod)
+item(tt(chmod) [ tt(-Rs) ] var(mode) var(filename) ...)(
+Changes mode of files specified.
+
+The specified var(mode) must be in octal.
+
+The tt(-R) option causes tt(chmod) to recursively descend into directories,
+changing the mode of all files in the directory after
+changing the mode of the directory itself.
+
+The tt(-s) option is a zsh extension to tt(chmod) functionality. It enables
+paranoid behaviour, intended to avoid security problems involving
+a tt(chmod) being tricked into affecting files other than the ones
+intended. It will refuse to follow symbolic links, so that (for example)
+``tt(chmod 600 /tmp/foo/passwd)'' can't accidentally chmod 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 chmod of
+a deep directory tree can't end up recursively chmoding tt(/usr) as
+a result of directories being moved up the tree.
+)
findex(chown)
item(tt(chown) [ tt(-hRs) ] var(user-spec) var(filename) ...)(
Changes ownership and group of files specified.
@@ -124,15 +144,15 @@ fall back on copying and removing files; if this behaviour is desired,
use tt(cp) and tt(rm) manually. This may change in a future version.
)
findex(rm)
-item(tt(rm) [ tt(-dfirs) ] var(filename) ...)(
+item(tt(rm) [ tt(-dfiRrs) ] var(filename) ...)(
Removes files and directories specified.
-Normally, tt(rm) will not remove directories (except with the tt(-r)
-option). The tt(-d) option causes tt(rm) to try removing directories
+Normally, tt(rm) will not remove directories (except with the tt(-R) or tt(-r)
+options). The tt(-d) option causes tt(rm) to try removing directories
with tt(unlink) (see manref(unlink)(2)), the same method used for files.
Typically only the super-user can actually succeed in unlinking
directories in this way.
-tt(-d) takes precedence over tt(-r).
+tt(-d) takes precedence over tt(-R) and tt(-r).
By default, the user will be queried before removing any file
that the user cannot write to, but writable files will be silently
@@ -142,9 +162,9 @@ any files. The tt(-f) option causes files to be
silently deleted, without querying, and suppresses all error indications.
tt(-f) takes precedence.
-The tt(-r) option causes tt(rm) to recursively descend into directories,
-deleting all files in the directory before removing the directory with
-the tt(rmdir) system call (see manref(rmdir)(2)).
+The tt(-R) and tt(-r) options cause tt(rm) to recursively descend into
+directories, deleting all files in the directory before removing the directory
+with the tt(rmdir) system call (see manref(rmdir)(2)).
The tt(-s) option is a zsh extension to tt(rm) functionality. It enables
paranoid behaviour, intended to avoid common security problems involving