在Debian系統上,通過SFTP(SSH File Transfer Protocol)誤刪除文件后,可以嘗試以下方法來恢復數據:
sudo apt-get update
sudo apt-get install extundelete
extundelete /dev/vdb1 --restore-directory ferris
extundelete /dev/vdb1 --restore-file 22.txt
extundelete /dev/vdb1 --restore-all
sudo apt-get update
sudo apt-get install testdisk
sudo testdisk
請注意,數據恢復的成功率取決于許多因素,例如文件系統的類型、文件刪除后的時間、磁盤的使用情況等。因此,在嘗試恢復文件之前,請確保不再向該磁盤寫入任何數據,以免覆蓋已刪除的文件。