[plug] Linux Spot Quiz

Mike Holland myk at golden.wattle.id.au
Thu Oct 21 15:05:12 WST 1999


On Thu, 21 Oct 1999, Matt Kemner wrote:

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

Good. But why dd rather than just 'cp'?  I often see examples with dd
where cp seems to work, e.g. coping a floppy image to /dev/fd0.
I dislike dd because it doesnt follow normal unix syntax. So the shell
filename completion doesnt work. Windoze isnt alone in having ugly
historical baggage.

Bonus points for the experts:
Do you know any way to create a hard link to the file, so he doesnt even
need to break the download?
(kernel patches not accepted)

> 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.

Cool - i hadnt noticed that before.

> Can I have my 2c please? :)

Certainly. Cash transactions subject to rounding.


Mike Holland <mike at golden.wattle.id.au>            Perth, Australia.
                          --==--
The early bird may get the worm, but the second mouse gets the cheese.





More information about the plug mailing list