If your server is running multiple applications, it could be run out of space at one point. When your server shows you low disk space, you may be required to identify the larger files on your server that are occupying the large space of the server.
Following are some useful commands to find out the larger files.
- Find the files that are equal to or greater than 500 MB.
find / -type f -size +500M
- Find the files that are greater than 1 GB.
find / -type f -size +1G
- Search Files By Size and Extension.
If you are looking to find the files with a specific extension then you can run the below command. Using the below command, you can find all the log files that are greater than 1 GB in size.
find / -type f -name "*.log" -size +1G