Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • df can be real pain to parse. If you have a sufficiently long device name (LVM) the output can be split across two lines. Commented Jun 9, 2019 at 23:31
  • 1
    @roaima ooh, true, I hadn't even thought of LVM names. Still, the device should at least never have whitespace, so on GNU systems, the df . | grep -Po '^/\S+' should work. But yeah, findmt is a safer choice. I just like df . since it's so short and perfectly adequate for human consumption. Commented Jun 9, 2019 at 23:58