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


Popular posts from this blog

Debugging pfsense firewall rules clearly and easily

Direct ssh to a server via proxy using putty/plink on Windows

telnet vs netcat