Pydf - Check disk space usage with colored output
Last Updated :
23 Aug, 2021
Pydf is a command-line-based tool that shows the amount of disk space available on the mounted file system. This tool is similar to the df command, but pydf command gives output in different colors for different file systems.pydf tool is highly customizable, and this tool is written in the python language.
Installation of Pydf
Now let's see how to install the pydf on the Linux systems. The pydf tool is written in the python language, hence it is also available as a python package we can install the pydf using the pip python package manager. To install the pydf using the pip, use the following command:
pip install pydf
Now let's see how to install the pydf using package managers of different distros of Linux. Use the following command to install pydf according to your installed operating system:
For Ubuntu/Kali Linux/Debian:
sudo apt-get install pydf
For Arch Linux:
sudo pacman -S pydf
For Fedora:
dnf install pydf

Usage
To use the pydf just run the pydf command which will show the size of the mounted file system with used, available space, and mounted location of the file system.
pydf
To show the file system having 0 blocks in the output use the -a or -all option with the pydf command:
pydf -a
To show the output in human-readable format i.e. in KB, MB or GB use the option -h with pydf command:
pydf -h
To show the output in the kilobytes, use the option -k with pydf command:
pydf -k
To show the information of inodes instead of block, use the -i or --inodes option with pydf command:
pydf -i
To show the output in megabytes use the -m or --megabytes option with the pydf command:
pydf -m
To show the output in the gigabytes, use the use -g or --gigabytes option with the pydf command:
pydf -g
To disable colorized output use the --bw option with pydf command:
pydf --bw

Customizing the color of pydf output
Pydf provides /etc/pydfrc file to configure the output of the pydf . To customize the output of the pydf edit the /etc/pydfrc file with an editor
sudo nano /etc/pydfrc
To configure pydf at the user level, create the .pydfrc file in the home directory of the user and put the configurations in the file.
cat /etc/pydfrc > ~/.pydfrc
To know more about the pydf tool, read the man page of pydf .
man pydf
Similar Reads
Shell Script to Check Disk Space Usage Disk usage is a report generated by the Linux system about different disks available or created on the secondary memory. These disks are also known as partitions, they have their isolated filesystem. This facility provides us the measurements of different labels or features like Used space, Free spa
3 min read
Discus - Show Colourised Disk Space Usage in Linux Discus is the prettier version of the df command to check the disk space utilization in Linux. Discus has several cool features such as color, bar graphs, and smart formatting of numbers. You can also configure it in your own way after copying its main configuration file /etc/discusrc to ~/.discusrc
2 min read
How to Check Disk Space in Linux Efficient disk space management is important for maintaining the performance and stability of your Linux system. Over time, files and applications can fill up your storage, potentially causing slowdowns or errors. Commands to Check DIsk Space in LinuxKnowing how to check disk space in Linux helps yo
6 min read
How to Change the Output Color of Echo in Linux When working with a computer, some users may encounter a situation where they need to output text in a different color. The colors we are familiar with by now will have been worked out for our particular machine and thus can be replaced easily if needed. Echo is a Linux command that can be used to c
9 min read
How to Check the Size of a Directory in Linux Many times during working on Linux we may encounter situations, where we want to check the total size occupied by a directory, especially when working with large files and directories. Knowing the file or directory size can help a user perform tasks like storage allocation, size comparison, etc. At
7 min read