In linux, given a path to a file, is there any way to tell which filesystem it is on?
Specifically, I'm trying to figure out how much space is left on the drive that
/home/itsadok/bananas is in. From
df I can see how much space is left on the various mounted drives, but it's a hard to figure out which of them is relevant.
By the way, I want to do this from a script, so educated guesses are not allowed.