Find Large Files in *NIX

Hints HOWTOs

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.

Leave a Reply

Your email address will not be published.
*
*

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

Apple

My Apple Collection

Yesterday I finally got a book shelf to hold the majority of my Apple hardware/software collection. Amongst the collection – I have some eMates, Newtons, Cube, QuickTake camera, original Apple floppy disks, Apple II GS, ImageWriter, original iPod, iPhone, etc. I am still missing a 20th Anniversary Mac, but that is still on the list […]