Update:
As of March 2015 truncate
is no longer available in Homebrew as a standalone formula.
As truncate
is part of GNU Coreutils you should install it on OS X with the following command:
> brew install coreutils
After installation truncate
will be available under the name gtruncate
. Note that all programs from Coreutils will be available with the prefix g
.