HOW TO FIND THE LARGEST FILES OR DIRECTORIES ON YOUR VPS
October 30, 2015 / by Marco / Categories : Software, TechnologyMy CentOS VPS was running out of space so I needed to do a bit of a clean up and decided to see which files and directories used up the most space. So after some digging around I found these two commands.
This one is to find the largest 10 directories:
find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
This one is to find the largest 10 files:
find . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
If you want to display more than 10 results then change the tail -10 to another amount. I then found a couple of large xml files and deleted these which freed up over 2 GB of data.
Our Sponsors
- Advertise Me Pty Ltd
Digital Signage Solutions
OTHER ARTICLES YOU MAY LIKE
BUGS IN TIKTOK WEB APP
In this article, I will discuss the bugs I have encountered while using the Tik Tok web app. When using the TikTok web app, I encountered a frustrating issue where I was unable to follow back users. This problem has persisted, leaving me with zero following despite my efforts to engage with the platform. As […]
read moreTHE BEST WOOCOMMERCE AFFILIATE AFFILIATE RETAILER PLUGIN FOR MAXIMUM PROFITS
In today’s highly competitive e-commerce landscape, leveraging the power of affiliate marketing has become a crucial strategy for online retailers to maximize their profits. And when it comes to running an efficient and lucrative affiliate program on your WooCommerce store, choosing the right plugin is paramount. The best WooCommerce affiliate retailer plugin that stands out […]
read more