I used ubuntu and ssh by shh-remote extension to another ubuntu server, and I accidentally deleted a folder containing important files by pressing the delete key. I pressed "ctrl+z" but it did not restore.
What did vsc actually do?
How did I recover the deleted files (either by Visual Studio Code or by another way)?
update:
I use testdisk to recover but it show "ok" quite low, and "failed" quite high?
Many thanks.
2
Answers
You cannot recover files you have deleted with SSH through the VSCode editor built-in properties like Ctrl-Z. Operations on the disk are the responsibility of the operating system.
If you have not GUI acces to OS maybe you can look at the
or if your files deleted with root privileges
If your files are not deleted permanently you can restore with Trash-CLI program:
then put this command to terminal
If your files deleted permanently check this link for file recovery:
How to Recover Deleted Files in Ubuntu Through TestDisk
VS code actually fixed this and you can now un-delete a file while in an SSH remote session using CTRL + Z
If you’re here cause you think you can’t do give it a try!