There are several commands you can use in Unix to view disk usage information, including:
df: Thedfcommand displays information about disk space usage on your file system. By default,dfshows disk usage information for all mounted file systems.
Here’s an example of how to use df:
df -h
The -h option makes the output more human-readable, by displaying the sizes in “human-readable” format (e.g., in MB, GB, etc.).
du: Theducommand displays the size of a directory and its subdirectories. By default,dushows the size in kilobytes.
Here’s an example of how to use du:
du -h /path/to/directory
The -h option makes the output more human-readable, by displaying the sizes in “human-readable” format (e.g., in MB, GB, etc.). Replace /path/to/directory with the path to the directory you want to check.
ncdu: Thencducommand is a disk usage analyzer that provides an ncurses-based interface for viewing disk usage information.
Here’s an example of how to use ncdu:
ncdu /path/to/directory
Replace /path/to/directory with the path to the directory you want to check.