Skip to content

Instantly share code, notes, and snippets.

@leepa
Created December 31, 2012 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leepa/4422736 to your computer and use it in GitHub Desktop.
Save leepa/4422736 to your computer and use it in GitHub Desktop.
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