[BozemanLUG] I deleted a file I was working on ...

david david at eder.us
Mon Apr 17 15:28:06 EDT 2017


I deleted a file I was working on on Friday.  It was a real bummer 
because I spent a lot of hours on it.  I immediately did an extundelete, 
but it wasn't recoverable.  So I wrote a quick program to scan all of 
the 4k blocks on the disk.  It found 1,600 fragments that it put on 
another drive.  I pieced together the most recent fragments based on the 
last changes I recall making.  In the end, it took a couple of days, but 
I got my file back. It took 5 hours just to read every block on my 3T 
drive.

I love the fact that stuff like this is possible in Linux.

In a GUI on many platforms, it goes to something like the recycle bin.  
But if you delete a file from the command line in Windows, or Visual 
Studio, it doesn't.  Then you are stuck.  You have to boot into Linux to 
have raw access to your disk.

The only gripe I have is that modern version of Fedora can't mount 
-oremount ro.  As it was, I was operating on an active mount. That's 
pretty risky.  I closed the browser and stopped receiving mail to 
minimize the writes a little.

David.


More information about the Discuss mailing list