Is there any way to install Ubuntu's truncate command to Mac OS X 10.7 in order to use the command in Terminal shell?
This shouldn't really be in Server Fault, probably Super User or Ask Different, but you can install a lot of binaries by using homebrew, found here:
Firstly you'll need to install command line tools for Xcode, which will probably require you to purchase it if you havn't already.
Once you've done this, run:
To install homebrew, then when it's installed, run:
As of March 2015
Make a file full of zeros:
Truncate an existing file:
Note: the OS X