Skip to content

Instantly share code, notes, and snippets.

@zoechi
Created May 24, 2013 05:50
Show Gist options
  • Save zoechi/5641520 to your computer and use it in GitHub Desktop.
Save zoechi/5641520 to your computer and use it in GitHub Desktop.
Is there a Linux command to easily find out which partition/mount a directory or file is on? (This is probably a RTFM question, and I feel guilty for asking it, but somehow, I can't find a good answer on google just yet..) http://stackoverflow.com/questions/3274354/how-to-find-out-mount-partition-a-directory-or-file-is-on-linux-server
df -P file/goes/here | tail -1 | cut -d' ' -f 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment