write 1 to block device

dd if=/dev/zero bs=1 count=200 | sed 's/x00/xff/g'
tr '00' '377' < /dev/zero | dd of=file bs=1024 count=2k 
awk 'BEGIN {for (i=0; i<20480; i++) {printf "%c", 255}}' > $@.tmp 
printf '%*s' 2048 ' ' | tr ' ' '377' 

原文地址:https://www.cnblogs.com/2ne1/p/5974841.html