Data-Recovery

恢復 $HOME 目錄中的單個文件

  • November 14, 2014

我不小心跑了rm -r /home/xralf,很快就用Ctrl+殺死了它C

似乎一切都很好,但我注意到對我.vimrc來說很重要的 my 失去了。

我嘗試了命令:

$ extundelete /dev/sda5 --restore-file /home/xralf/.vimrc
extundelete: failed to read-only open device "/dev/sda5": Error code 13

要恢復文件,但似乎有問題,我需要解除安裝設備。

它安裝在這裡:/dev/sda5 on /home type ext4 (rw)

  • 有沒有可能恢復文件.vimrc
  • 你將如何重新安裝它?$HOME 我需要目錄有問題。

我不能使用LiveCD,因為它現在在我的筆記型電腦上不見了。USB我的筆記型電腦也不支持從啟動。

使用以下命令執行命令sudo

sudo extundelete /dev/sda5 --restore-file /home/xralf/.vimrc
WARNING: Extended attributes are not restored.
WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set.
The partition should be unmounted to undelete any files without further data loss.
If the partition is not currently mounted, this message indicates 
it was improperly unmounted, and you should run fsck before continuing.
If you decide to continue, extundelete may overwrite some of the deleted
files and make recovering those files impossible.  You should unmount the
file system and check it with fsck before using extundelete.
Would you like to continue? (y/n) 

Error code 13EACCES- 訪問衝突。

您沒有從設備讀取的權限。以超級使用者身份執行命令,即使用sudo extundelete ....

該錯誤是因為您的 sda 是 ext4 並且您正在嘗試使用 ext3

引用自:https://unix.stackexchange.com/questions/141646