Created
December 6, 2023 03:22
-
-
Save brettinternet/41ec65b9814a918843dc9eaa60d89c7d to your computer and use it in GitHub Desktop.
Maps device letter to disk by ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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