如何使用“rm -R”恢复已删除的文件命令在linux服务器? [英] How to recover the deleted files using "rm -R" command in linux server?

查看:2059
本文介绍了如何使用“rm -R”恢复已删除的文件命令在linux服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不幸地在Linux服务器中使用'rm -R'命令删除了一些重要的文件和文件夹。

I have unfortunately deleted some important files and folders using 'rm -R ' command in Linux server.

有什么办法可以恢复吗?

Is there any way to recover?

推荐答案

简短的答案:你不能。 rm r e m oves个文件,没有'trash'的概念。

Short answer: You can't. rm removes files blindly, with no concept of 'trash'.

一些Unix和Linux系统试图通过默认将其破坏性限制为 rm -i 来限制其破坏能力,但不是全部。

Some Unix and Linux systems try to limit its destructive ability by aliasing it to rm -i by default, but not all do.

长答案:根据您的文件系统,磁盘活动以及删除发生的时间长短,您可以 可以恢复您的部分或全部内容删除。如果您使用的是EXT3或EXT4格式的驱动器,您可以查看 extundelete

Long answer: Depending on your filesystem, disk activity, and how long ago the deletion occured, you may be able to recover some or all of what you deleted. If you're using an EXT3 or EXT4 formatted drive, you can check out extundelete.

谨慎使用 rm 。创建提供交互性的 del 别名,或使用文件管理器。

In the future, use rm with caution. Either create a del alias that provides interactivity, or use a file manager.

这篇关于如何使用“rm -R”恢复已删除的文件命令在linux服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆