4

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.

5

$ 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)

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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