Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # lists all IDE hard disk devices on system
- for g in /proc/ide/hd*/media; do
- if test ! -e "$g"; then continue; fi
- if test xdisk = "x`cat $g`"; then
- d="${g%/*}"; d="${d##*/hd}"
- echo /dev/hd$d
- fi
- done
- # lists all SATA hard disk devices on system
- for sd in `egrep '^[[:space:]]*[0-9]+[[:space:]]+[0-9]+[[:space:]]+sd[a-z] ' /proc/diskstats |awk '{print $3}'`; do
- echo /dev/$sd
- done
Add Comment
Please, Sign In to add comment