Replace dd usage with truncate.