Answer by karmakaze for Install Ubuntu truncate command to Mac OS X 10.7
One point of consideration is if the truncated file is the same file or a new file with the same name. Of importance for log files that are still being written-to, or being tailed. :> file Works on...
View ArticleAnswer by Alex Yursha for Install Ubuntu truncate command to Mac OS X 10.7
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...
View ArticleAnswer by Ian Mackinnon for Install Ubuntu truncate command to Mac OS X 10.7
When truncate is not available you can often use dd instead. Eg. Make a file full of zeros: dd if=/dev/zero of=/tmp/youroutputfile bs=1m count=50 Truncate an existing file: dd if=yourinputfile...
View ArticleAnswer by Alex Berry for Install Ubuntu truncate command to Mac OS X 10.7
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: http://mxcl.github.com/homebrew/ Firstly you'll need...
View ArticleInstall Ubuntu truncate command to Mac OS X 10.7
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?
View Article