Академический Документы
Профессиональный Документы
Культура Документы
df command
df is a Linux command line utility to monitor your Linux disk usage. The df command prints the
complete summary of the disk usage details of your file system. With -hT switch along with df
command, it displays details about the filesystem, type, total size of the disk, size used already, size
still remaining, total used percentage level and where the disk is mounted on etc. in an easy readable
format.
To display the disk usage of all file systems and its type in human readable format.
For more details of df of command refer this “11 df command examples in Linux”
2. pydf command
pydf is a python command line utility and one of the best alternative for df command in Linux. It
works similar to df command, but one difference is that the output is highlighted in different colors.
Pydf command is not available by default in CentOS 7.x and RHEL 7.x. To install pydf on CentOS 7.x /
RHEL 7.x , run the beneath commands one after the another.
Collecting pydf
Downloading pydf-12.tar.gz
[root@openstack ~]#
Refer the below steps to install ‘pydf’ utility on Ubuntu 16.04/16.10 and Linux Mint 18
Display the output of all the file system using below command
To list all the available options of pydf command , use the below command
3. fdisk Command
One of the most commonly used command line utility in Linux to monitor the partitions is the fdisk
command. fdisk also called as fixed disk and fdisk helps you to get all details about the partitions in
your system and also helps you to monitor, create, delete, move, copy any partition in your Linux
system. With the fdisk command, data can be moved to a new disk as well. Make sure that you are a
root user to run this command, or else you may get error “command not found”. Let’s see some of the
basic fdisk commands and how does it help you in monitoring the partitions in your Linux system.
Delete a Partition
To do any operation on any specific disk, you should be in the fdisk command mode of that particular hard
disk like “fdisk /dev/sda” and enter d to being the delete operation. Once you enter “d” the system will
prompt for which partition number need to be deleted and once you enter the partition number and then
enter “w” to write the table to disk and exit the process. Please be careful with the delete operation as it
would wipe out the whole partition and its data from your system.
Create new Partition
To create a new partition, as usual be in the fdisk command mode “fdisk /dev/sdb” and enter “n” to create
new partition and it will ask you to create whether a primary “p” or extended partition “e” and then enter
the size of the cylinder by “+11G” where it means 11 GB will be set as the size for the cylinder.
4. sfdisk command
sfdisk stands for scriptable fdisk, sfdisk is a similar command like fdisk, but comes with more features
than fdisk as it can display the partition size in MB. sfdisk also supports GPT, Sun, MBR and SGI
partition tables, but sfdisk cannot create standard partitions for Sun and SGI disk label where as fdisk
command is capable of creating partitions of these disks.
To display the size of partitions in MB, run the below command :