Created
June 1, 2015 17:07
-
-
Save etcwilde/d4fcd47ba7b9c3362818 to your computer and use it in GitHub Desktop.
Various handy hardisk scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
hdparm -Y $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment