Find Large Files in *NIX

I recently ran into an issue where backups for a project were taking much more space than I thought they should. I figured there was a large error log somewhere – and sure enough I was able to easily find it with the following command:


du -sh *

That command du (disk usage) along with the options -sh (s = summarize, h = human readable) will then output something like this:

7.9M	admin
700K	api
1.4G	delivery
4.0K	error_log
44K	images
4.0K	index.php
4.0K	robots.txt

From there I can then see that the big disk space hog is in the “delivery” directory. Running the command then within that directory then showed there was a huge 1.4G error log which needed addressed.

This command is very useful and will save a lot of time if you run into a similar situation as I did.

About the Author...

Jennifer Zelazny

My name is Jennifer Zelazny and this site is a collection of my random thoughts and opinions. I am Penn Stater, WordPress developer, and a modern day explorer. I love exploring data, trends, and things that make the world a better place and sharing them here.

Leave a Reply

Your email address will not be published.
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*