在Ubuntu系統中,如果你誤刪了文件,可以通過以下幾種方法嘗試恢復:
ls /home/username/.local/share/Trash/files
mv 命令將其移動到其他目錄中進行恢復:mv /home/username/.local/share/Trash/files/deleted-file /path/to/restore/location
如果以上方法都無法恢復文件,可以嘗試使用一些數據恢復軟件,例如 extundelete 或 testdisk。這些工具可以幫助你恢復被刪除的文件,但成功率取決于數據是否已被新數據覆蓋。
sudo apt-get install extundelete
sudo extundelete /dev/sda1 --restore-file path/to/deleted/file
sudo apt-get install testdisk
df -h
或
lsblk
通過上述方法,你應該能夠在Ubuntu系統中成功恢復回收站中的廢棄文件。如果問題復雜或數據非常重要,可能需要尋求專業的數據恢復服務。