From the command line (bash) I would like to know what disk a given file is stored in. E.G.:

$ [what filesystem is this file in command] /tmp/example/file


1 Answer 1


You can get the answer by using df command on the directory containing the executable. For example, on you example, you could say

df /tmp/example
  • @don_crissti my df (GNU coreutils 8.13) does not have that option: df: unrecognized option '--output=source'.
    – terdon
    Commented Jun 11, 2013 at 2:08

Not the answer you're looking for? Browse other questions tagged .