Do not use
- The listing.
- The listing mode is maintained for backward compatibility only.
- For more robust and customizable output use
findmnt(8), especially in your scripts.
- Note that control characters in the mountpoint name are replaced with ?.
findmnt, as the documentation suggests. Here are a few interesting options as described by
- invert the sense of matching
- print all submounts for the matching filesystems
- limit the set of filesystems by FS types
Those are only a couple of the many filters you can apply on the commandline.
findmnt --fstab -t nfs
- Prints all NFS filesystems defined in
findmnt --fstab /mnt/foo
- Prints all
/etc/fstab filesystems where the mountpoint directory is
/mnt/foo. It also prints
--bind mounts where
/mnt/foo is a source.
You might use:
findmnt -it sysfs,cgroup,proc,devtmpfs,devpts,pstore,debugfs,hugetlbfs,mqueue,configfs
That should filter out all pseudo-filesystems, I believe.
Still, you can do the same with
mount -t nosysfs,nodevtmpfs...
Possibly a better way might be to use one of either the following commands, which
findmnt --help describes as noted:
findmnt -D or
- Imitate the output of
df(1). This option is equivalent to
-o SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET but excludes all pseudo filesystems. Use
--all to print all filesystems.
You can add list fields to the defaults with
+field,+field.... You can specify your own list of fields using only the file-systems
-D would show by omitting the