- lsof | grep myfile
- the second column is the process id
- the number in the fourth column is the file descriptor
- cp /proc/<process id>/fd/<file descriptor> myfile.saved
Showing posts with label accidentally. Show all posts
Showing posts with label accidentally. Show all posts
Monday, 8 April 2013
Recover accidentally deleted file as long as some process still has it open, on Linux
Labels:
accident,
accidentally,
delete,
deleted,
file descriptor,
hold,
linux,
lsof,
pid,
proc,
process,
recover,
recovering,
recovery,
still open
Subscribe to:
Posts (Atom)
Interview questions: 2020-12
Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer Networking Layer 1 vs Layer 4 haproxy u...
-
kubectl --cert=/tmp/tls.crt --key=/tmp/tls.key create secret tls tls-wc-ingress
-
apt-get install exim4 dpkg-reconfigure exim4-config Select: internet site; mail is sent and received directly using SMTP IP-addresses...
-
NOTE: unbound is now available via epel repo on Amazon Linux install requirements yum groupinstall "Development Tools" yum i...