To verify file system utilization on Linux, you can use several commands and tools that provide information about disk space usage, including the df and du commands. Here’s how to use each of these commands:
- df – Disk Free Space:The
dfcommand is a simple and commonly used tool to display information about file system disk space utilization. By default, it shows information about mounted file systems.To display file system utilization information for all mounted partitions, run:df -hThe-hoption makes the output more human-readable, showing sizes in megabytes (MB) or gigabytes (GB) instead of blocks.
- du – Disk Usage:The
ducommand is used to estimate file and directory space usage. It’s helpful for drilling down into specific directories to see which files or directories are consuming the most space.To check the disk usage of a specific directory, navigate to that directory and run:bashCopy codedu -hThe-hoption, as before, makes the output human-readable.If you want to see the disk usage of the current directory and its subdirectories in a summarized form, you can use the following command:bashdu -sh *This will display the sizes of the subdirectories and files in the current directory.
These commands will help you verify file system utilization on your Linux system and identify which directories or file systems are consuming the most disk space. Depending on your needs, you can choose the most suitable command for your analysis.
