How to find local disk space by `df` command?

6,402

Solution 1

$ df -lh would do the work.

Where [from man page],

-l, --local - limit listing to local file systems

-h, --human-readable - print sizes in human readable format (e.g., 1K 234M 2G)

Solution 2

df -l should restrict the output to local file systems.

Alternatively, if you know that the device name of the local disk is, for example, /dev/sda, then you can use grep to filter out just those disks: df | grep sda.

Share:
6,402

Related videos on Youtube

Joey Yi Zhao
Author by

Joey Yi Zhao

Updated on September 18, 2022

Comments

  • Joey Yi Zhao
    Joey Yi Zhao almost 2 years

    df command can be used to list all mounted folder spaces. The output includes local disk, remote disk. Is there a way for me to get the disk usage only for the local disk? I'd like to filter out other types of mounted points.