Quantcast
Channel: Install Ubuntu truncate command to Mac OS X 10.7 - Server Fault
Viewing all articles
Browse latest Browse all 5

Answer by Ian Mackinnon for Install Ubuntu truncate command to Mac OS X 10.7

$
0
0

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 of=/tmp/youroutputfile bs=1k count=1

Note: the OS X dd uses lower case unit letters where GNU dd uses upper case.


Viewing all articles
Browse latest Browse all 5

Trending Articles