What is the best way to find out file system information about a file.For example, if I have a file/media/xyz/path/to/file.extAnd /etc/fstab contains//server1/Share1 /media/xyz cifs option1=value1,...How can I determine that the file is on a Samba share, that it has the local path /path/to/file.ext and with what options the file system was mounted?Is parsing the output of mount a portable solution? Or parse findmnt? Is there a POSIX-compliant way to achieve that?
How to get filesystem info for a specific file?
mount;posix