tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Import truncate(1) from FreeBSD
On Wed, Nov 05, 2025 at 07:39:30PM +0100, Naveen Narayanan wrote:
> +.Pp
> +If a file is made smaller, its extra data is lost.
> +If a file is made larger,
> +it will be extended as if by writing bytes with the value zero.
More helpfully, I'd suggest taking the wording from ftruncate(2).
Except that ftruncate(2) should also be clearer about whether the
extra space added is allocated or a hole.
(The answer is fs-dependent, but it's normally a hole and in
particular it's allowed to be, which is why you have to do something
else if you want to make sure the blocks are filled in.)
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index