diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2013-11-21 01:03:15 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2013-11-21 11:43:48 +0100 |
commit | 2da7009d70693d830393021f2751729d06ce5551 (patch) | |
tree | 686d6f7ee371b4289109f220d03c68e7896d0f5b /doc/coreutils.texi | |
parent | 65f8a39d90dd223e52c1077a6a37eabf05e95e21 (diff) | |
download | coreutils-2da7009d70693d830393021f2751729d06ce5551.tar.xz |
doc: enhance diagnostic when rm skips "." or ".." arguments
The error diagnostic
"rm: cannot remove directory: '.'"
does not give the user a hint for the reason.
Issue a clearer error message.
* src/remove.c (rm_fts): Enhance the error diagnostic in the above
case to emphasize that skipping is done deliberately.
In the corresponding comment, mention that POSIX mandates this
behavior. Likewise in the subsequent comment for skipping "/".
* doc/coreutils.texi (rm invocation): In the paragraph describing
the above behavior, mention that POSIX mandates it.
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r-- | doc/coreutils.texi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 035f2e67c..64713dc4a 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -9281,7 +9281,8 @@ the @option{-f} or @option{--force} option is not given, or the If the response is not affirmative, the file is skipped. Any attempt to remove a file whose last file name component is -@file{.} or @file{..} is rejected without any prompting. +@file{.} or @file{..} is rejected without any prompting, as mandated +by POSIX. @emph{Warning}: If you use @command{rm} to remove a file, it is usually possible to recover the contents of that file. If you want more assurance |