Quantcast
Viewing latest article 3
Browse Latest Browse All 5

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

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


Viewing latest article 3
Browse Latest Browse All 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>