Skip to content

Instantly share code, notes, and snippets.

@leepa leepa/gist:4422736
Created Dec 31, 2012

Embed
What would you like to do?
How to determine which ata device is which sata device on linux - really handy!
dmesg | grep 'ata[0-9]\+.[0-9][0-9]: ATA-' | \
sed 's/^.*\] ata//' | \
sort -n | sed 's/:.*//' | \
awk ' { a="ata" $1; printf("%10s is /dev/sd%c\n", a, 96+NR); }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.