Remix.run Logo
Nursie 6 days ago

I haven't used this for a long old time. Back in the day it was the only way to recover your university dissertation when you'd rm -rf'd in the wrong directory.

Go on, ask me how I know ...

I've not had much cause to use it since then though.

danielktdoranie 6 days ago | parent | next [-]

Okay, I’ll bite mate:

How do you know?

antonvs 6 days ago | parent [-]

They rm -rf'd the wrong directory, lost their dissertation, and used mc to recover it.

Nursie 6 days ago | parent [-]

Yeah, the answer was there in the question really :)

That was not a good day, about a week before submission was due. I unmounted the disk the second I realised what I'd done and started to look for guides on finding lost ext2 inodes. MC to the rescue!

ksynwa 6 days ago | parent | prev [-]

mc can recover deleted files?

Nursie 6 days ago | parent [-]

Back in the 90s it certainly had some features that made it easier to do so, yes. On ext2 file systems (no journaling or other advanced features) it had some method to browse unlinked inodes that were still on disk so you could recover them. They’d then show up in “lost+found”.

If you were quick and unmounted as soon as you had realised what you’d done, and the space had not been re-used for anything, you could often get the file back because rm just unlinked the inodes on ext2 IIRC.

I imagine that the commands it used under the hood were accessible to anyone with the right know-how, but at the time that’s not something I had, and all the guides started with “use midnight commander” so I did :)

(Saying “only way” to recover might be a stretch, it’s true)