Find Largest Files in Linux Terminal

There are times when you need to find the largest files in your Linux Terminal. Here are a list of commands that you can use to find out what is bloating your website. Remember that every web page that you have should not load any more than 2 MB maximum.

Use The List Command ls -ls

If you want to see the descending order of the files according to their size, use this command. The largest files will be on top. This is great if you just want to see the largest files in your directory, but it does not show the file size.

 

ls -ls

 

Only cool people share!

View The File Size with the Find Command

To view the file size with the find command, use this. Specifically, what this command does is find any files that are over 100 MB. If it does not find anything, it will return nothing. If it finds them, then it will list the files that are over 100 MB.

 

find . -type f -size +100M

 

Find Files Over 10MB

So if you wanted to find files 10 MB and over, use this command.

 

find . -type f -size +10M

Find Large Files In A Directory

If you wanted to find large files in a directory on Linux, use this command. Notice, we are searching the directory of test in the command below.

 

find ./test -type f -size +100M

 

 

 

 

Find Largest Files in Linux Terminal was last modified: November 7th, 2022 by Maximus Mccullough
Summary
Find Largest Files in Linux Terminal
Article Name
Find Largest Files in Linux Terminal
Description
There are times when you need to find the largest files in your Linux Terminal. Here are a list of commands that you can use to find out what is bloating your website.
Author
Publisher
A1WEBSITEPRO LLC
Logo
Find Largest Files in Linux Terminal

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.