[plug] Linux Spot Quiz

Matt Kemner zombie at networx.net.au
Thu Oct 21 14:37:35 WST 1999


On Thu, 21 Oct 1999, Mike Holland wrote:

> Sam accidentally 'rm's the 200GB tarball that he has almost finished
> ftp'ing down his 14.4 modem. But 'df' tells him the disk space has not
> been freed. How can he recover the file?

Try: Find the pid of the ftp session, look in /proc/<pid>/fd/ for the file
descriptor matching the tarball, and run:
"dd if=/proc/nnnn/fd/X of=/tmp/saved.tgz"

It helps if you're running a 2.2.x kernel, since the fd will come up as a
symlink to the original filename with (deleted) after it.

Can I have my 2c please? :)

 - Matt




More information about the plug mailing list