Boyan, Julian On Friday 20 October 2006 14:25, Boyan Tabakov wrote:
...
Nice:) Just clicked 'send' and KMail fetched your answer too:) Anyway... so I was right... it is a broken open call.
@Julian - you shouldn't bother with the reported file size, when you flush it with cat /dev/null > .xsession-errors since the holes of the files are not actually written to disk (at least not the holes bigger than one block). You won't waste any space.
Indeed. Everything you wrote here and in the preceding post is correct, though I believe all POSIX-compatible file systems support writing at arbitrary locations, either within or beyond the current end-of-file. Whether or not the file "holes," as they are indeed called, are backed by allocated disk blocks or have their zero-fill content supplied by the file system code, I'm not sure. In the old days, when there was just "the" Unix file system, it was definitely the case that holes were not allocated disk blocks. It's also true that not all programs are smart about recreating holes when the copy such files. Some do, some don't, so even if the file is not now taking up as many blocks as its logical size suggests, it may occupy that many when, say, a backup is performed. YMMV, as they say... Randall Schuzl