On 8/11/05, "ФʢÎÄ(Faris Xiao)" <[EMAIL PROTECTED]> wrote: > > 8.7.1 rm -rf .* > > In "rm -rf .*", ".*" expands to include "." and "..", and if you happen > to have privileges to write to the parent directory then you'll end up > removing all directories *next* to your current directory as well. > > * "rm -rf ." : removes everything under current directory and > current directory itself. > * "rm -rf *" : removes every non-dot files and non-dot directories > under current directory > * "rm -rf .[^.]*" : removes every dot files and dot-directories > under current directory. > * "rm -rf .*" : removes everything under parent directory and parent > directory itself. > > 当我以 root 执行 rm -rf .* 命令的时候,会提示无法删除,我实际上有对上级 > 目录的写权限。 > > debian:~/tmp# rm -rf .* > rm: 无法删除'.'或'..' > rm: 无法删除'.'或'..' > > > 请问这是原英文文档的描述错误还是在新版的 sarge 中关闭掉了这一个危险的功能? >
The rm command refuses to remove "." or ".." at all. Please see rm_1() in src/remove.c of the coreutils package. Interested people can track down the source archive to see where this change is introduced. Qingning