Examples:
session A (monitor):The another examples; wait until /mnt/test is unmounted:
findmnt --poll
session B (event):
mount /home/fs-images/ext2.img /mnt/test
session A (findmnt output after event):
ACTION TARGET SOURCE FSTYPE OPTIONS
mount /mnt/test /dev/loop0 ext2 rw,relatime,user_xattr,acl,barrier=1
findmnt --poll=umount --first-only /mnt/testInform me about all ext2, ext3, and ext4 remounts to read-only mode:
findmnt --poll=remount --types ext2,ext3,ext4 --options roYou can also define output columns, for example if you want to know more about "mount --move" operations:
# findmnt --poll=move -o OLD-TARGET,TARGET,SOURCEthe event in this example was generated by "mount --move /mnt/test /mnt/foo" command.
OLD-TARGET TARGET SOURCE
/mnt/test /mnt/foo /dev/loop0
And for example if you want info about old and new options after remount:
# findmnt --poll=remount -o TARGET,OLD-OPTIONS,OPTIONSthis event was generated by "mount -o remount /mnt/foo -o rw,strictatime" command.
TARGET OLD-OPTIONS OPTIONS
/mnt/foo ro,relatime,user_xattr,acl,barrier=1 rw,user_xattr,acl,barrier=1
All this is available in util-linux 2.20 (e.g. Fedora 16).