[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[qref] tips.sgml 翻译一问




     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 中关闭掉了这一个危险的功能?

--

肖盛文(Faris Xiao)
Email:atzlinux@163.com




Reply to: