Article View: comp.sys.sun
Article #9977Re: cronlog question
From: smb
Date: Fri, 30 Dec 1988 20:42
Date: Fri, 30 Dec 1988 20:42
8 lines
1037 bytes
1037 bytes
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.
Technical Details
Message-ID:
<8812202330.AA16315@hector.homer.nj.att.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!rice!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: smb@research.att.com Newsgroups: comp.sys.sun Subject: Re: cronlog question Message-ID: <8812202330.AA16315@hector.homer.nj.att.com> Date: 30 Dec 88 20:42:33 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 8 Approved: Sun-Spots@rice.edu Original-Date: Tue, 20 Dec 88 18:30:58 EST X-Sun-Spots-Digest: Volume 7, Issue 82, message 11 of 18