2

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

/dev/sda1
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Vincent Scheib
  • 2,073
  • 4
  • 20
  • 19
  • 1
    Related: http://unix.stackexchange.com/questions/27271/what-file-system-is-my-file-on –  Jun 10 '13 at 22:26

1 Answers1

10

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
unxnut
  • 5,908
  • 2
  • 19
  • 27
  • @don_crissti my `df` (GNU coreutils 8.13) does not have that option: `df: unrecognized option '--output=source'`. – terdon Jun 11 '13 at 02:08