On Mon, Mar 14, 2011 at 01:55:56AM +0100, Jerome BENOIT wrote:
Hello List,
I have just notice the following (weird ?) behaviour.
When I view a pdf file with evince,
if I move (`mv') a new pdflatexed version of this file, I have to reload it manually in evince.
But if I touch (`touch') the new pdflatexed version, evince reloads it as expected.
Is there any (rational) explication for that ?
This strikes me as behaviour related to filesystem inodes. When you
'touch' a file, the metadate (in this case, the date) on the file is
modified. Evince sees this and reloads the file. But when you move one
file into the place of another, Evince is still looking at the old file.
There is a peculiarity (peculiar from a Windows perspective, a boon from
a Unix perspective) about Linux filesystems that a file is only deleted
once all references to it are gone. So, in the case of the old file, we
have two references: 1) The directory entry and 2) Evince's handle. By
moving the new file in, we delete the old directory entry and make a new
one pointing to the new file. However, reference 2 still exists.
So, as far as Evince is concerned, the file hasn't changed.