Ubuntu恢復誤刪文件方法如下:
若文件被刪除后進入回收站(Trash),可通過以下方式恢復:
trash-cli
后,使用trash-restore
按提示操作。sudo apt install testdisk
sudo testdisk
:選擇磁盤→“Advanced”→“Undelete”掃描并恢復文件。sudo photorec
:選擇磁盤和文件類型直接恢復。sudo apt install extundelete
sudo extundelete /dev/sdX --restore-file /path/to/file
(恢復單個文件)。--restore-all
:恢復所有被刪文件。rsync
或云存儲備份。若工具無法恢復,可嘗試專業數據恢復服務。