System Information Commands
df: The df command displays filesystem disk space usage for all mounted partitions. “df -h” is probably the most useful – it uses megabytes (M) and gigabytes (G) instead of blocks to report. (-h means “human-readable”)
-h, –human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-T, –print-type print file system type
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 10G 5.1G 4.5G 52% /home
/dev/sdb1 25G 23G 2.2G 92% /media/Label
$df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 10G 5.1G 4.5G 52% /home
/dev/sdb1 fuseblk 25G 23G 2.2G 92% /media/Label
For more info type the following command:
$df --help
du: The du command displays the disk usage for a directory. It can either display the space used for all subdirectories or the total for the directory you run it on.
-h, –human-readable print sizes in human readable format (e.g., 1K 234M 2G)
–si like -h, but use powers of 1000 not 1024
-s, –summarize display only a total for each argument
$ du -h /home/user
1024k /home/user/files
5.1G /home/user
$du -sh /home/user
5.1G /home/user
For more info type the following command:
$du --help
You must be logged in to post a comment.