Web development and Tech news Blog site. WEBISFREE.com

HOME > linux

[Linux] Checking storage capacity and other information using df

Last Modified : 04 Mar, 2023 / Created : 05 Mar, 2023
635
View Count

Let's learn about the df command, which enables us to check the storage capacity of a Linux system.



# Learning about the Linux command "df".


DF is an abbreviated form of "disk file system," which provides information about the disk file system. It is particularly useful for verifying the amount of space being used and the remaining space. Below are some simple options for use.
h // It is printed in easy-to-read units
m // View in megabytes (MB) units.
k // View in kilobyte (K byte) units.
T // Checking the Type of File System


The following is the output result when using the df -h command.
df -h

Filesystem   Size   Used    Avail    Use%    Mounted on
rootfs     953G    146G    808G   16%      /
C:\        953G    146G    808G   16%      /mnt/c

You can see that it has been printed with a size change to G units.


! Select specific devices to print.


If you enter a specific device with the following value, you can only see what you want. If you want to see only /mnt/c, it is as follows.
df -h /mnt/c

Filesystem    Size    Used    Avail    Use%    Mounted on
C:\             953G  146G   808G   16%     /mnt/c

You can see that only /mnt/c is displayed.


We have learned about the Linux command df up to this point.

Perhaps you're looking for the following text as well?

    Previous

    Setting Up a New Service in Linux's systemctl

    Previous

    How to stop or kill a process in use in Linux