So I just recently downloaded Linux Ubuntu and I was experimenting with some of the functions to get used to Linux. While I was trying to learn I wrote in the terminal find . -delete -name (file name) thinking it would delete just that specific file BUT it deleted ALL my personal files in just about EVERY directory from home (I used this command in the home directory so kind of makes sense). I used a very specific file name though so I can't imagine that any other file would have the same name as it (it was "asdfasdf"). Is there anything I can do to restore all my information? And how should I have coded to just remove the specific file using find and NOT rm?
Asked
Active
Viewed 7,202 times
1 Answers
0
Short answer: no, because by default GNU/Linux doesn't come with a Recycle Bin when using terminal and executing commands like rm
and find . -delete
.
But as other users said, you could restore your files from a backup or try to restore them using some rescue software (but it'll take some time and as you execute more and more write operations on your disk, lower are the chances you're gonna get your data back).
Best regards.

Stefano Martins
- 262
- 1
- 3
find -delete
Erased Everything – steeldriver Jan 07 '20 at 21:58