Recover accidentally deleted file as long as some process still has it open, on Linux


  1. lsof | grep myfile
    1. the second column is the process id
    2. the number in the fourth column is the file descriptor
  2. cp /proc/<process id>/fd/<file descriptor> myfile.saved

Comments

Popular posts from this blog

Openvpn and unbound combined break dig command

Stress Linux system: stress-ng

Google Nexus 4: permanent back panel glass repair for less than a penny