How VPS - How to use/setup VPS
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

Pydf an Alternative “df” Command to Check Disk Usage in Different Colours

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
19
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Installing pydf
    1. On RHEL/CentOS/Fedora/Scientific Linux
      1. Sample Output
    2. On Debian/Ubuntu/Linux Mint
      1. Sample Output
  2. How to Use pydf Command
  3. How to Customize pydf Colours

The “pydf” (Python Disk File System) is an advanced command line tool and a good alternative to Linux “df comand”. It is used to display the amount of used and available disk space on a Linux file systems, same like df command, but in different colours. The output of the pydf command can be customizable according to your needs.

Pydf an Alternative “df” Command to Check Disk Usage in Different Colours

Pydf Command to Check Disk Usage

This “pydf” command is written in python language that displays the amount of disk usage and available space on Linux mounted file system, using custom colours for different file system types.

Installing pydf

By default, pydf tool is not installed on Linux distributions, you need to install it using third party repository. So, first enable EPEL repository and afterwards enabling it, use the following “yum command” to install it.

On RHEL/CentOS/Fedora/Scientific Linux

# yum install pydf
Sample Output
Loaded plugins: fastestmirror, security
Determining fastest mirrors
epel/metalink								| 4.2 kB        
 * base: mirror.nbrc.ac.in
 * epel: mirrors.ispros.com.bd
 * extras: mirror.nbrc.ac.in
base                                                                   	| 3.7 kB         
epel                                                                    | 3.9 kB       
epel/primary_db                                                         | 4.2 MB        
extras                                                                  | 3.5 kB        
updates                                                                 | 3.5 kB     
updates/primary_db                                                      | 1.9 MB     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pydf.noarch 0:9-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================
 Package                            Arch            	Version         	Repository		Size
==================================================================================================================
Installing:
 pydf                               noarch              9-3.el6         	epel                    14 k

Transaction Summary
==================================================================================================================
Install       1 Package(s)

Total download size: 14 k
Installed size: 25 k
Is this ok [y/N]: y
Downloading Packages:
pydf-9-3.el6.noarch.rpm                                                 |  14 kB        
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : pydf-9-3.el6.noarch                                          1/1 
  Verifying  : pydf-9-3.el6.noarch                                          1/1 

Installed:
 pydf.noarch 0:9-3.el6                                                                                                                                   

Complete!

On Debian/Ubuntu/Linux Mint

On Debian based distributions, the pydf tool is availabe from package manager system, you can install it using “apt-get command” as shown below.

$ sudo apt-get install pydf
Sample Output
[sudo] password for tecmint: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  java-wrappers
Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
  pydf
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 12.1 kB of archives.
After this operation, 70.7 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ raring/universe pydf all 10 [12.1 kB]
Fetched 12.1 kB in 1s (6,097 B/s)
Selecting previously unselected package pydf.
(Reading database ... 175568 files and directories currently installed.)
Unpacking pydf (from .../apt/archives/pydf_10_all.deb) ...
Processing triggers for man-db ...
Setting up pydf (10) ...

How to Use pydf Command

If you run only “pydf” command without specifying argument, it will display just information of disk space usage along with all mounted file systems.

# pydf
Filesystem Size  Used Avail Use%                                            Mounted on
/dev/sda2   49G 3244M   44G  6.4 [###.....................................] /         
/dev/sda1  194M   43M  140M 22.4 [#########...............................] /boot     
/dev/sdb1  492G  345G  122G 70.2 [#########################...............] /data    
/dev/sda3   39G 4043M   33G 10.0 [####....................................] /home     
/dev/sda6   55G   33G   19G 60.0 [########################................] /var      
/dev/sdc1  492G  262G  205G 53.3 [#####################...................] /videos

To check which file system having 0 blocks, simple run the following command along with “-a” or “–all” argument.

# pydf -a
Filesystem  Size  Used Avail Use%                                        Mounted on             
/dev/sda2    49G 3244M   44G  6.4 [##..................................] /                       
/dev/sda1   194M   43M  140M 22.4 [########............................] /boot                   
/dev/sdb1   492G  345G  122G 70.2 [#########################...........] /data                   
devpts         0     0     0    - [....................................] /dev/pts                
tmpfs      3995M     0 3995M  0.0 [....................................] /dev/shm                
/dev/sda3    39G 4043M   33G 10.0 [####................................] /home                   
proc           0     0     0    - [....................................] /proc                   
none           0     0     0    - [....................................] /proc/sys/fs/binfmt_misc
sysfs          0     0     0    - [....................................] /sys                    
/dev/sda6    55G   33G   19G 60.0 [######################..............] /var                    
sunrpc         0     0     0    - [....................................] /var/lib/nfs/rpc_pipefs 
/dev/sdc1   492G  262G  205G 53.3 [###################.................] /videos

To see the output in human readable format, use the option “-h”, which will print sizes (e.g., 10K, 10M, 10G).

# pydf -h
Filesystem Size  Used Avail Use%                                            Mounted on
/dev/sda2   49G 3244M   44G  6.4 [###.....................................] /         
/dev/sda1  194M   43M  140M 22.4 [#########...............................] /boot     
/dev/sdb1  492G  345G  122G 70.2 [############################............] /data
/dev/sda3   39G 4043M   33G 10.0 [####....................................] /home     
/dev/sda6   55G   33G   19G 60.0 [########################................] /var      
/dev/sdc1  492G  262G  205G 53.3 [#####################...................] /videos

To print sizes in kilobytes (e.g., 1024 block size) use option “-k” as shown below.

# pydf -k
Filesystem      Size      Used     Avail Use%                                        Mounted on
/dev/sda2   51606140   3321932  45662768  6.4 [##..................................] /         
/dev/sda1     198337     44371    143726 22.4 [########............................] /boot     
/dev/sdb1  516054864 362172932 127667872 70.2 [#########################...........] /data     
/dev/sda3   41284928   4140032  35047744 10.0 [####................................] /home     
/dev/sda6   57593092  34575244  20092232 60.0 [######################..............] /var      
/dev/sdc1  516054864 274980776 214860028 53.3 [###################.................] /videos

To print summary output in megabytes (e.g., 1048576 block size) use option “-m” as shown below.

pydf -m
Filesystem   Size   Used  Avail Use%                                           Mounted on
/dev/sda2   50397   3244  44593  6.4 [##.....................................] /         
/dev/sda1     194     43    140 22.4 [#########..............................] /boot     
/dev/sdb1  503960 353685 124675 70.2 [###########################............] /data     
/dev/sda3   40317   4043  34226 10.0 [####...................................] /home     
/dev/sda6   56243  33768  19618 60.0 [#######################................] /var      
/dev/sdc1  503960 268536 209824 53.3 [#####################..................] /videos

To print sizes in gigabytes (e.g., 1073741824), specify option “-g” as shown below.

# pydf -g
Filesystem   Size   Used  Avail Use%                                           Mounted on
/dev/sda2   50397   3244  44593  6.4 [##.....................................] /         
/dev/sda1     194     43    140 22.4 [#########..............................] /boot     
/dev/sdb1  503960 353685 124675 70.2 [###########################............] /data     
/dev/sda3   40317   4043  34226 10.0 [####...................................] /home     
/dev/sda6   56243  33770  19616 60.0 [#######################................] /var      
/dev/sdc1  503960 268536 209824 53.3 [#####################..................] /videos

To see the information about inodes instead of blocks, use the argument “-i” as given below.

# pydf -i
Filesystem Nodes  Used Avail Use%                                            Mounted on
/dev/sda2  3200k   78k 3122k  2.5 [#.......................................] /         
/dev/sda1    50k    40   50k  0.1 [........................................] /boot     
/dev/sdb1    31M  411k   31M  1.3 [#.......................................] /data     
/dev/sda3  2560k  3031 2557k  0.1 [........................................] /home     
/dev/sda6  3576k  873k 2703k 24.4 [##########..............................] /var      
/dev/sdc1    31M 2033k   29M  6.4 [###.....................................] /videos

If you want to disable colourised output, simply use the option “–bw“.

# pydf --bw
Filesystem Size  Used Avail Use%                                            Mounted on
/dev/sda2   49G 3244M   44G  6.4 [###.....................................] /         
/dev/sda1  194M   43M  140M 22.4 [#########...............................] /boot     
/dev/sdb1  492G  345G  122G 70.2 [############################............] /data   
/dev/sda3   39G 4043M   33G 10.0 [####....................................] /home     
/dev/sda6   55G   33G   19G 60.1 [########################................] /var      
/dev/sdc1  492G  262G  205G 53.3 [#####################...................] /videos

How to Customize pydf Colours

The pydf has its own configuration file, where you can define your own custom colours to give some extra feel and look to your output.

# vi /etc/pydfrc

For more information read man pages of pydf command by hitting “man pydf” in a terminal.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
How VPS

How VPS

Related Posts

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Install Apache Tomcat 8 on CentOS 7
Linux

How to Install Apache Tomcat 8 on CentOS 7?

February 11, 2020
Install Arch Linux With Btrfs Snapshotting
Uncategorized

Install Arch Linux With Btrfs Snapshotting

February 13, 2020
Next Post

Learn How to Use ‘dir’ Command with Different Options and Arguments in Linux

Understand Linux Shell and Basic Shell Scripting Language Tips – Part I

A Bash Script to Create a Bootable USB from ISO in Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow Us

  • 121 Followers
  • 87.2k Followers

Recommended

fkill – Interactively Kill Processes in Linux

4 years ago

Installing Fork CMS on FreeBSD 12

3 years ago

Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser

4 years ago

Cloudwith.me Review

4 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

Topics

Apache Web Server Bluehost Review 2019 Bluehost Review 2020 Bluehost Review 2021 Centmin Mod CentminMod centos install htop fsck htop install HTTP DoS attack Install Snort on an Ubuntu install Zabbix on CentOS install Zabbix on CentOS 7 Linux Commands linux guide linux install htop linux vps setup guide MariaDB MariaDB Error Mysql mysqld error optimize MariaDB optimize Mysql snort Ubuntu
No Result
View All Result

Highlights

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Webmin Reviews

Virtualmin Reviews

CentOS Web Panel Reviews

Ajenti Reviews

ISPConfig Reviews

Trending

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

by How VPS
February 25, 2022
0

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After...

How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020
Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

February 17, 2020
Webmin Reviews

Webmin Reviews

February 17, 2020
How VPS – How to use/setup VPS

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8 February 25, 2022
  • How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”? November 17, 2020
  • How to optimize Mysql or MariaDB November 3, 2020

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.