Riddle me on this one

D. Hugh Redelmeier hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Sat Jan 21 22:48:02 UTC 2012


| From: Christopher Browne <cbbrowne-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>

| I have seen this phenomenon when a file has been removed while a
| process is still writing to it.

Of course you are right, but I think that the principles deserve to be
clearly stated:

A file can have one or more names within the filesystem (hard links)

When the last link has been deleted, and no process has the file open,
the file will be deleted.

Processes can have files open for read or write.

===============

Log files are a special case of this.

You can truncate a log file
	echo >/var/log/whatever
This will free the space but leave the file.  Somewhat confusing.

The logging system has ways for rolling over logs.  I don't remember
them, but they are what you want to use if you space is eaten by a log
file.
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list