cronlog question

smb at research.att.com smb at research.att.com
Sat Dec 31 06:42:33 AEST 1988


The problem happens because you truncate cronlong while cron is running.
Cron has the file open; hence, there's a file table entry for it with some
large offset pointing to the current 'write' position.  Now you come along
and truncate it.  The next write() still takes place at that (large)
offset, creating a large hole -- defined as containing zeros -- at the
beginning of the file.  These holes don't take any space (unless you've
copied the file via cp or some such), as can be seen by comparing the 'ls
-l' output with the 'ls -s' output.



More information about the Comp.sys.sun mailing list