#!/bin/bash

dd if=/dev/zero of=/var/tmp/infile count=1175000 &>/dev/null

for bs in  1k 2k 4k 8k 16k 32k 64k 128k 256k 512k 1M 2M 4M 8M  
do
        echo "[块大小  = $bs]"
        dd if=/var/tmp/infile of=/var/tmp/outfile bs=$bs 2>&1 | (grep copied | awk -F ',' '{print "用时/速度:" $2,$3}') 
        echo ""
done
rm /var/tmp/infile /var/tmp/outfile