[H-GEN] mv moratoria..

Byron Ellacott rodent at homer.humbug.org.au
Sun Sep 20 23:04:20 EDT 1998


On Mon, Sep 21, 1998 at 11:57:21AM +1000, Robin & Andy McPherson-Bruce wrote:
> just a quick question - am i right in thinking that, when i mv'ed
> /usr/log/ppplog (created, for the sake of permanence, by
> /etc/syslog.conf) to ~/ppplog, i created a (soft?) link to the latter? i
> initially forgot to -HUP syslogd & seemed to wind up with more in
> ~/ppplog than i expected, is all..
If you recall the earlier discussion on inodes, it may help shed some
light.

What happened was syslogd had /usr/log/ppplog open(), and so was
referencing it by inode rather than filename.  Renaming the file
(effectively, that's all a same-filesystem mv does) just changes where
you go to find its inode.  If you already have it, you keep writing to
it no matter what it's called these days.

The same thing happens when you unlink() a file .. if an application
has it open() then the actual disk space will not be freed until the
inode is close()d.

Clearer?

-- 
Byron Ellacott
BInfTech: http://www.uq.edu.au
UQNGA: http://www.uqnga.org.au
Humbug: http://www.humbug.org.au





More information about the General mailing list