Linux回收站文件誤刪可按以下方法找回:
從桌面環境回收站恢復
~/.local/share/Trash/files/
,可直接打開回收站找到文件,右鍵選擇“恢復”或手動復制到目標位置。gio trash --restore 文件名
。使用命令行工具恢復
apt-get install extundelete
或yum install extundelete
),然后通過--restore-file
或--restore-directory
指定文件/目錄恢復。lsof | grep deleted
找到進程和文件描述符,再用debugfs
工具恢復(需指定設備路徑和文件名)。使用專業數據恢復工具
注意事項:
rm -rf
直接刪除且未進入回收站,需優先使用命令行或專業工具恢復。