It is well known that UNIX systems won't actually delete a file on disk while the file is in use. So if a file is being accessed by process 1 and process 2 deletes the file using rm, process 1 continues to see the file; additionally the file descriptor link at /proc/(process 1 id)/fd reports the original contents of the deleted file.
However, if process 2 overwrites the file as opposed to deleting it (say with echo "abracadabra" > file.txt), the file descriptor link at /proc/(process 1 id)/fd reports the overwriting material("abracadabra"), while process 1 is still able to access the original contents of the file. Why this difference?
[Edit]The snippet below is in response to Jim Paris
>uname -a
Linux ravoori-netbook 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UT
C 2012 i686 i686 i386 GNU/Linux
>echo original > /tmp/foo
>tail -0f /tmp/foo &
[2] 6144
>rm /tmp/foo
>cat /proc/6144/fd/3
original
>echo abracadabra > /tmp/foo
>cat /proc/6144/fd/3
original
