1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
#!/bin/bash for a in $(cat /proc/diskstats | awk {'print $3'}); do check=(/dev/$a) echo checking $check mount $check /mnt/testmount 2>/dev/null if [ -f /mnt/testmount/hda1.img ] then echo "found at $check" fi umount -l $check 2>/dev/null done