Subject: Re: Suggestion: inclusion of the truncate(1) utility into the tree
To: None <greywolf@starwolf.com>
From: John Hawkinson <jhawk@MIT.EDU>
List: tech-userlevel
Date: 07/23/2000 19:50:54
In message <Pine.NEB.4.21.0007231604150.7144-100000@mage.starwolf.com>, Greywol
f writes:
>On Sat, 22 Jul 2000, Alexander Langer wrote:
>
># Thus spake John Hawkinson (jhawk@MIT.EDU):
># 
># > | FreeBSD recently imported a truncate(1) utility into their
># > | src-tree, which is a command-line frontend to truncate(2).
># > Why is not ``dd'' sufficient?
>
>Because "dd" requires an intermediate copy to truncate the
>file while a truncate(1) utility would use truncate(2) to
>truncate the file in place -- more quickly, I might add.

No.

dd if=/dev/null of=file-to-truncate seek=howevermuchtotruncate

--jhawk