Skip to content

Instantly share code, notes, and snippets.

@mikerr
Created October 25, 2016 13:12
Show Gist options
  • Select an option

  • Save mikerr/ffe44724ebc78903c81b1f1b5f6bb82c to your computer and use it in GitHub Desktop.

Select an option

Save mikerr/ffe44724ebc78903c81b1f1b5f6bb82c to your computer and use it in GitHub Desktop.
Get all SERIAL numbers from connected hard drives/ SD cards and flash drives....
for f in `ls -1d /dev/*` ;
do
udevadm info -n $f 2>/dev/null |grep -i serial ;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment