Pretty cool: I've just learned a very simple but rather useful trick that will certainly help with my basic home automation and shell scripting. mount command has an option to list filesystems by type.
List Mounted Filesystems by Type
Quite often your Linux/Unix system will have filesystems of different types: most likely it will be special types like proc or tmpfs along with a number of traditional (Linux) filesystem types like ext2/ext3/ext4 or xfs.
mount -t command helps list just the mounted filesystems of certain type.
For instance, here's how I can see just the ext4 filesystems on one of my Linux servers:
greys@s2:~ $ mount -t ext4 /dev/md0 on / type ext4 (rw,relatime,stripe=256,data=ordered) /dev/md1 on /var/log type ext4 (rw,relatime,stripe=256,data=ordered) /dev/md2 on /storage type ext4 (rw,relatime,stripe=256,data=ordered) /dev/md0 on /var/lib/docker/devicemapper type ext4 (rw,relatime,stripe=256,data=ordered)
And here's how I can now easily confirm list of AFPFS network shares mounted from my NAS server on MacBook under macOS:
greys@MacBook-Pro:~ $ mount -t afpfs //[email protected]/t3chstack on /Volumes/t3chstack (afpfs, nodev, nosuid, mounted by greys) //[email protected]/Storage on /Volumes/Storage (afpfs, nodev, nosuid, mounted by greys) //[email protected]/Stuff on /Volumes/Stuff (afpfs, nodev, nosuid, mounted by greys)
Leave a Reply