Test if a file is on NFS?
With GNU stat
on Linux at least:
stat -fc %T /path/to/the/file
It works for nfs
and most common filesystems, but not for all of them.
This is kinda random, but not terribly dirty:
df -TP /path/to/your/file | tail -1 | awk '{print $2}'
It will break if your filesystem name has spaces in it.