I accidentally deleted an important file from a Linux system that I'd really want to recover. The main problem is that machine is a critical system that cannot be shut down nor can the relevant partition be unmounted. That file is relatively small (a Python script) so there's a good chance it wasn't already overwritten. What is the best method of approaching this?


  • 1
    You best bet would be to recover from backup... File recovery tools are usually not designed to be used on mounted partitions. – mtak Dec 6 '16 at 13:42

Update - Solved by bgrep'ing on the entire disk for a known string.

  • 5
    Please edit your answer as if you were answering somebody else’s question.  Describe the commands you issued and how you used the outputs, in enough detail that somebody who finds this question in the future will be able to use your answer.  Low-quality answers are subject to deletion. – Scott Dec 6 '16 at 23:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.