Created
December 22, 2023 04:17
-
-
Save dominicusin/c108d48c03aef7dc18fcbe7b1c19fb82 to your computer and use it in GitHub Desktop.
onelinecmd
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
find /dev/disk/by-id/ -type l|xargs -I{} ls -l {}|grep -v -E '[0-9]$' |sort -k11|cut -d' ' -f9,10,11,12 | |
lsblk |awk 'NR==1{print $0" DEVICE-ID(S)"}NR>1{dev=$1;printf $0" ";system("find /dev/disk/by-id -lname \"*"dev"\" -printf \" %p\"");print "";}'|grep -v -E 'part|lvm' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment