How to Find All Files Larger than 1GB in Linux? Print

  • 2

If your server runs multiple applications, it could run out of space anytime. When your server has insufficient disk space, you may be required to identify the larger files on your server occupying the server's space.

Following are some useful commands to locate the large files – 

1. Find the files that are equal to or greater than 500 MB.

find / -type f -size +500M 

2. Find files that are greater than 1 GB.

find / -type f -size +1G 

3. Search files by size and extension.

If you want to find the files with a specific extension, you can run the below-given command to see all the log files that are greater than 1 GB.

find / -type f -name "*.log" -size +1G

Once you know which files are taking up the space, you can take appropriate action to deal with the low space on your server or for any other purpose.

Get Linux VPS Hosting

Was this answer helpful?

« Back