Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Wat het doet
findmnt lists all mounts with source, type and options — clearer than mount. With a folder or device it shows only that mount. findmnt --verify checks every line of /etc/fstab (devices, mount points, types) — use it after editing fstab, before a reboot.
Zo schrijf je het
findmnt [OPTION]... [DEVICE|MOUNTPOINT]
findmnt [OPTION]... [--source] DEVICE [--target PATH]Opties 43
Meest gebruikt
Select
Check
Output
Niets past bij dit filter.
Voorbeelden 11
$ als gewone gebruiker# als root (of met sudo)
1All mounts as a tree
findmntSource, type and options for every mount.
2One mount point
findmnt /data TARGET SOURCE FSTYPE OPTIONS /data /dev/vdb1 xfs rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquotaExit code 1 when nothing is mounted there.
3Check /etc/fstab before reboot
findmnt --verify Success, no errors or warnings detectedCatches wrong UUIDs, missing folders and typos.
4Only real disk file systems
findmnt -t xfs,ext4,vfatWithout proc, sys, cgroup …
5Like df
findmnt -DSize and use per mount.
6Which file system holds a file?
findmnt -T /var/log/messagesShows the mount that contains this path.
7What is in fstab?
findmnt -sThe fstab lines as a table.
8Find mounts without noexec (security)
findmnt -O noexec -i -n -o TARGET -t xfs,ext4,tmpfsFolders where users could run programs.
9Get the device of a mount for scripts
findmnt -n -o SOURCE / /dev/mapper/rhel-rootClean value.
10Watch mount changes live
findmnt -pShows mounts and unmounts as they happen (Ctrl+C to stop).
11JSON for monitoring
findmnt -J -o TARGET,FSTYPE,SIZE,USE% -t xfsFeed a dashboard.
Niets past bij dit filter.
Exitcodes
0 :: Found (or verify OK). 1 :: Nothing found (or verify found errors).