#!/bin/bash # # Copyright 2008 Pavel Machek , GPLv2 # echo "Writing test files: " for A in `seq $NUMFILES`; do echo -n $A " " rm final.$A cat /dev/urandom | head -c $FILESIZE > tmp.$A dd conv=fsync if=tmp.$A of=/mnt/final.$A 2> /dev/zero || exit # cat /mnt/final.$A > /dev/null || exit # sync should not be needed, as dd asks for fsync # sync mv tmp.$A final.$A done