Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm getting mighty tired of having to manually egrep out NFS- and SMB-mounted filesystems whenever I am checking on the condition of locally-mounted filesystems. So, my question is thus: is there some combination of flags that I can pass to either df or mount that will force them to display ONLY local filesystems and skip any and all network-mounted ones?

share|improve this question

df -l. This depends on network filesystems being properly identified as such, though.

share|improve this answer
up vote 4 down vote accepted

Okay, as seems to be the case 75% of the time, I've actually tripped over the answer to my own question. The -t and -x flags for df will do what I'm looking for.

-t [type] will list filesystems matching fs TYPE [type]

-x [type] will list filesystems NOT matching fs TYPE [type]

I.e., for me to exclude NFS-mounted filesystems, the command is df -x nfs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.