How much disk space a database takes?
Monday, May 24th, 2010Login to mysql and run :
select SUM(data_length) + SUM(index_length) as size from information_schema.tables where table_schema = ‘your_database’;
Login to mysql and run :
select SUM(data_length) + SUM(index_length) as size from information_schema.tables where table_schema = ‘your_database’;
rpm -qa –queryformat ‘%{SIZE} %{NAME} %{VENDOR}\n’ | sort -n -r | head -10
Check :rpm –querytags for all the tags
du –max-depth=1 $PWD | sort -n -r
du -H –max-depth=1 $PWD
“-H” – produce human readable format sizes (like: 1K 10M 1G)
A good and short one liner using xargs
du -s ./* | sort -n| cut -f 2-|xargs -i du -sh {}
This will sort the folders according to size and display them in human readable format… to reverse the list
use sort -nr option.