Skip to content

Instantly share code, notes, and snippets.

@etcwilde
Created June 1, 2015 17:07
Show Gist options
  • Save etcwilde/d4fcd47ba7b9c3362818 to your computer and use it in GitHub Desktop.
Save etcwilde/d4fcd47ba7b9c3362818 to your computer and use it in GitHub Desktop.
Various handy hardisk scripts
#!/bin/sh
# Rescan Hard disks
if [ "$(id -u)" != "0" ]; then
echo "Run as root" 1>&2
exit 1
fi
for i in $(ls /sys/class/scsi_host/); do
echo "- - -" > /sys/class/scsi_host/$i/scan;
done
#!/bin/sh
hdparm -Y $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment