Check Linux Disk Space Size

You can view it through the command that comes with the system or through third-party software, as follows:
  1. View file size
  View the size of all files in the current folder (including subfolders)
  du -sh 
  # du -h
15M ./package
16K ./.fontconfig 4.0K
./.cache
5.1M ./.rpmdb
20M . 

  2. The df -h
  Df command is to view the file system in the unit of disk partition in the Linux system. You can add parameters to view the remaining space information of the disk. The command format :
  df -hl
  display format is:
  Filesystem
  Size Used Avail Use% Mounted on
  /dev/hda2 45G 19G 24G 44% /
  /dev/hda1 494M 19M 450M 4% /boot
  / dev/hda6 4.9G 2.2G 2.5G 47% /home

  3. cfdisk comes from the util-linux package;
  cfdisk is also a good partitioning tool; in some distributions, this tool has been removed from the util-linux package ; cfdisk is simple and easy to use; it is similar to fdisk in DOS; in this title, we only explain how to check the disk partition status and file system used in the machine;
  check the usage of disk partitions cfdisk -Ps Disk device name;
  比如
  [root@localhost beinan]cfdisk -Ps
  [root@localhost beinan]cfdisk -Ps /dev/hda
  [root@localhost beinan]cfdisk -Ps
  Partition Table for /dev/hda

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326311412&siteId=291194637