#!/bin/sh echo "WRITE SPEED" for i in {0..2}; do A=$(dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc 2>&1 | tail -1 | cut -d " " -f 8-) echo $A done echo echo "READ SPEED" for i in {0..2}; do echo 3 > /proc/sys/vm/drop_caches A=$(dd if=tempfile of=/dev/null bs=1M count=1024 2>&1 | tail -1 | cut -d " " -f 8-) echo $A done echo echo "BUFFERED READ SPEED" for i in {0..2}; do A=$(dd if=tempfile of=/dev/null bs=1M count=1024 2>&1 | tail -1 | cut -d " " -f 8-) echo $A done rm tempfile