Created
August 16, 2026 11:24
-
-
Save rsbohn/dd3b6d8bbb3273dc6af31d0d1eb573d2 to your computer and use it in GitHub Desktop.
List mounted filesystems grouped by filesystem type
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
| # APPS/UTIL/STORAGE | |
| # List mounted filesystems grouped by filesystem type. | |
| if ! command -v findmnt >/dev/null 2>&1; then | |
| echo "findmnt not found" | |
| exit 1 | |
| fi | |
| findmnt -r -n -o FSTYPE,SOURCE,TARGET,OPTIONS | | |
| sort -k1,1 -k3,3 | | |
| awk ' | |
| BEGIN { | |
| last = "" | |
| printf "fstype:source:target\n" | |
| } | |
| { | |
| fstype = $1 | |
| source = $2 | |
| target = $3 | |
| #printf " %-30s %-30s %s\n", source, target, options | |
| printf "%s:%s:%s\n", fstype,source, target | |
| }' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment