Linux Tutorials - Herong's Tutorial Examples - v1.32, by Dr. Herong Yang
"du" - Display Disk Usage of Directories
Provides a tutorial example on how to use 'du' command to display disk usage of any given directories on Linux systems.
To see how much disk space is used by a given directory, you can use the "du" command. Here are some sample outputs of the "du" command on my CentOS 8 computer.
1. Display disk usage of my home directory using "du":
herong$ $ du ~ 124876 ./ftp/files 124876 ./ftp 124880 ./work/pytorch 0 ./work/r 124884 ./work 4 ./.cache/pip/http/6/8/c/5/e 4 ./.cache/pip/http/6/8/c/5 4 ./.cache/pip/http/6/8/c ... 104 ./.cache/pip/http/c 592 ./.cache/pip/http 596 ./.cache/pip 0 ./.cache/matplotlib/tex.cache 28 ./.cache/matplotlib 624 ./.cache 0 ./.config/matplotlib 0 ./.config 4 ./.keras 250420 .
2. Display disk usage without any sub-directory entries using "du -d 0":
herong$ du -d 0 250420 .
3. Display disk usage in human readable units using "du -h":
herong$ du -d 0 -h 245M .
4. Display disk usage in units of KB, MB, or GB using "du -k|m|g":
herong$ du -d 0 -k 250420 .
Table of Contents
Cockpit - Web Portal for Administrator
"df" - Display Free Space of File System
Mount USB Drive as File System
"fdisk" - Format Disk Partitions
"dd" - Copy Data from/to Storage Devices
Use "dd" Command to Test I/O Speed
"hdparm" - Hard Disk Parameters
►"du" - Display Disk Usage of Directories
Mount Windows NTFS File System
Access Persmissions on "ntfs-3g" File System
File System Types, IDs and Formats
"parted" - Partition Manipulation Program
Reformat NTFS Partition into EXT4 Partition
Unreachable Remote File Systems
SELinux - Security-Enhanced Linux
Software Package Manager on CentOS - DNF and YUM
Running Apache Web Server (httpd) on Linux Systems
Running PHP Scripts on Linux Systems
Running MySQL Database Server on Linux Systems
Running Python Scripts on Linux Systems
vsftpd - Very Secure FTP Daemon
Postfix - Mail Transport Agent (MTA)
Dovecot - IMAP and POP3 Server
Email Client Tools - Mail User Agents (MUA)