The df command reports file system disk space usage. It lists all your file systems by their device names, how much disk space they take up, and the percentage of the disk space used, as well as where they are mounted. With the -h option, it displays information in a more readable format, such as measuring disk space in megabytes instead of memory blocks. The df command is also a safe way to obtain a listing of all your partitions, instead of using fdisk (because with fdisk you can erase partitions). df shows only mounted partitions, however, whereas fdisk shows all partitions. Here’s an example:

You can also use df to tell you to what file system a given directory belongs. Enter df
with the directory name or df . for the current directory:
df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 76058116 10021764 62203248 14% /
No comments:
Post a Comment