How to Identify Large Files on Your Server
If your server runs multiple applications, it may run out of disk space at any time. When that happens, it's essential to locate the largest files occupying the server's storage to take appropriate action.
Find files equal to or larger than 500 MB
This command lists all files on the server that are larger than 500 MB:
find / -type f -size +500M
Find files larger than a specific size in GB
Replace X with the desired number of gigabytes to search for larger files:
find / -type f -size +XG
Search files by size and extension
To find files with a specific extension and above a certain size, such as log files larger than 1 GB:
find / -type f -name "*.log" -size +1G
Once you've identified the files consuming the most space, you can take appropriate steps—such as deleting, compressing, or moving them—to free up storage and maintain server performance.