LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 950|回复: 2

[讨论]rm删除的文件怎么恢复?

[复制链接]
发表于 2005-6-18 16:38:59 | 显示全部楼层 |阅读模式
:confused:
ljl@ljl:/mnt$ rm --help
用法:rm [选项]... 目录...
Remove (unlink) the FILE(s).

  -d, --directory       unlink FILE, even if it is a non-empty directory
                          (super-user only; this works only if your system
                           supports `unlink' for nonempty directories)
  -f, --force           ignore nonexistent files, never prompt
  -i, --interactive     prompt before any removal
      --no-preserve-root do not treat `/' specially (the default)
      --preserve-root   fail to operate recursively on `/'
  -r, -R, --recursive   remove the contents of directories recursively
  -v, --verbose         explain what is being done
      --help     显示此帮助信息并离开
      --version  显示版本信息并离开

要删除第一个字符为‘-’的文件 (例如‘-foo’),请使用以下其中一种方法:
  rm -- -foo

  rm ./-foo

请注意,如果使用 rm 来删除文件,通常仍可以将该文件恢复原状。如果想保证
该文件的内容无法还原,请考虑使用 shred。

Report bugs to <bug-coreutils@gnu.org>.
发表于 2005-6-18 17:54:16 | 显示全部楼层
Linux文件系统的反删除方法简介
http://tech.ccidnet.com/pub/article/c739_a239223_p1.html
还没实践过。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-18 20:47:28 | 显示全部楼层
不错。
在这个基础上应该可以写出更方便的工具来。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表