Skip to content

df: fails to print filesystem when argument is . #3065

Closed

Description

@jfinkels

df is able to find my root filesystem if I run it without any other arguments:

$ ./target/debug/df | grep ubuntu
/dev/mapper/vgubuntu-root 248618848256  94480936960 154137911296   38% /               

but if I run df ., it does not print my root filesystem

Filesystem          1k-blocks         Used    Available  Use% Mounted on 

Contrast this with GNU df:

$ df .
Filesystem                1K-blocks     Used Available Use% Mounted on
/dev/mapper/vgubuntu-root 242791844 92266552 138122400  41% /

Activity

  1. crazystylus commented on Feb 19, 2022

    @crazystylus
    Contributor

    I think there is more to this issue. I have verified, if I have a partition mounted at /root and I have a folder /root/docs then df /root/docs should print the details /root. And similarly if docs folder doesn't exist, it should pop an error No such file or directory.

    But in both cases output here is empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions