Recovering a Deleted Open File
Mike Kallies
mike.kallies-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Jul 7 12:57:09 UTC 2010
Hello Everyone,
I was gzipping a mammoth tarball and didn't realize that the gzip
process had not yet completed before I deleted the original.
I'm concerned that the gzip will run out of space, the process will drop
its file handle and the file will be freed. So I did a ctrl-z to stop
the process, and checked the open files. It's still there, all is good.
sooo... how do I give a handle back to /home/mike/Win2k3-d.tar ?
gzip Win2k3-d.tar
^Z
[1]+ Stopped gzip Win2k3-d.tar
mike at x24:~$ su -
Password:
root at x24:~# lsof | grep Win2k3-d.tar
gzip 2700 mike 3r REG 254,1 9011978240
343840 /home/mike/Win2k3-d.tar (deleted)
gzip 2700 mike 4w REG 254,1 2097266688
343841 /home/mike/Win2k3-d.tar.gz
root at x24:~#
(I know there may be better ways to solve the problem, but I heard that
this kind of "undelete" was possible, but I've never done it, so it
seems like a good thing to try)
Thanks,
-Mike
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list