Skip to content

Instantly share code, notes, and snippets.

@brettinternet
Created December 6, 2023 03:22
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 brettinternet/41ec65b9814a918843dc9eaa60d89c7d to your computer and use it in GitHub Desktop.
Save brettinternet/41ec65b9814a918843dc9eaa60d89c7d to your computer and use it in GitHub Desktop.
Maps device letter to disk by ID
#!/bin/bash
find /dev/disk/by-id/ -type l | xargs -I{} ls -l {} | grep -v -E '[0-9]$' | sort -k11 | cut -d' ' -f9,10,11,12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment