Oracle Linux: How to Identify Large Files and Directories in a Filesystem
NOTE: Please register a free account to access the full content and also to participate in Q&A in the community.
Applies to:
Oracle Cloud infrastructure
Oracle Linux
GOAL:
To provide reliable and practical methods for identifying large files and directories consuming disk space on Oracle Linux systems.
SOLUTION:
To properly find out where disk space is being used, run the following commands below:
You can recursively explore the filesystem to identify where the largest storage is being used:
Command with sample Output:
$ du -x -h / | grep ‘^\S*[0-9\.]\+G’ | sort -rn 14G / 3.5G /usr 2.9G /var 2.4G /var/cache 2.1G /home/opc 2.1G /home 1.7G /var/cache/dnf 1.6G /usr/lib 1.2G /usr/lib/firmware