#!/bin/bash for i in `cat /proc/partitions | sed "s/.* //" | grep "[0-9]$"` do echo "testing /dev/$i" /bin/cp /dev/$i /dev/null done