Last active
November 24, 2022 09:25
-
-
Save tdewin/db4dd0bb28c13ea49b3fa193dad0a5ad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Generic | |
| lsblk -f --json | jq '.blockdevices[] | select((.fstype == null) and (.children == null)) | {name:.name,available:.fsavail}' | |
| # Looking for VMware disks | |
| lsblk -O -J | jq '.blockdevices[] | select(.vendor == "VMware " and (.children == null)) | {name:.path,size:.size}' | |
| # I feel lucky | |
| TGTDISK=$(lsblk -O -J | jq -r '.blockdevices[] | select(.vendor == "VMware " and (.children == null)) | .path') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment