Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A quick method of calcuating the size of the trash System
I have seen a few hints and some very clever AppleScripts regarding this issue. But none seem to take advantage of OS X's ability to quickly calculate the total size of a selection of files.

When I need to quickly check how much is lurking in the Trash, I simply open the Trash, selected all the files, do Get Info (just hit Command-I) on the selection, and POW! The multiple item info window spits out the number of files, folders, items and best of all, the total size of the Trash. You can, of course, do this in any folder, or with any selection of files or folders, too.

This isn't the most flexible method in the world, and it won't show you a breakdown of which items are from which partition on your hard drive. But it's a nice quick way of knowing how much is waiting to get the boot, and it's faster than running a script or a third-party app!
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[3,919 views]  

A quick method of calcuating the size of the trash | 3 comments | Create New Account
Click here to return to the 'A quick method of calcuating the size of the trash' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Déjà Vu...
Authored by: gatorparrots on Jul 17, '03 12:42:35AM
We've already arrived at a couple of terminal methods and AppleScripts in the forum for calculating Trash size:
http://forums.macosxhints.com/showthread.php?s=&threadid=3965
http://forums.macosxhints.com/showthread.php?s=&threadid=8522

Total Trash size in KB: sudo du -sk /Users/$user/.Trash/ /Volumes/*/.trashes | awk '{t+=$1} END {print "Total KB: ", t/2}'
Enumerated by Trash in KB: sudo du -sk /Users/$user/.Trash/ /Volumes/*/.trashes
Enumerated by Trash in MB (requires GNU fileutils): sudo du -sh /Users/$user/.Trash/ /Volumes/*/.trashes

[ Reply to This | # ]
Déjà Vu...
Authored by: billatq on Jul 23, '03 11:17:40AM
Personally, I find it pretty quick to use the "du" command to see how large things are.
bill@hobbes/p2:~> du -s .Trash
96832   .Trash
or if I want to see individual files

bill@hobbes/p2:~> du cvs    
32      cvs/im-stats/CVS                                                                    
24      cvs/im-stats/old/CVS
24      cvs/im-stats/old
184     cvs/im-stats
24      cvs/stepmania/Announcers/CVS
0       cvs/stepmania/Announcers/Empty/caution
0       cvs/stepmania/Announcers/Empty/evaluation A
0       cvs/stepmania/Announcers/Empty/evaluation AA
0       cvs/stepmania/Announcers/Empty/evaluation B
0       cvs/stepmania/Announcers/Empty/evaluation cheer
0       cvs/stepmania/Announcers/Empty/evaluation new record
0       cvs/stepmania/Announcers/Empty/game over
0       cvs/stepmania/Announcers/Empty/gameplay 100 combo
0       cvs/stepmania/Announcers/Empty/gameplay 1000 combo
0       cvs/stepmania/Announcers/Empty/gameplay 200 combo
0       cvs/stepmania/Announcers/Empty/gameplay 300 combo
0       cvs/stepmania/Announcers/Empty/gameplay 400 combo

However, this returns it in bytes--perhaps not that friendly to everyone. Unfortunately, they use the older version of du that doesn't have the "-h" or "human" switch on it, which now exists in FreeBSD 5.

[ Reply to This | # ]
A quick method of calcuating the size of the trash
Authored by: bsauls on Aug 05, '09 11:51:58AM

An even faster and easier method, (I'm on Leopard 10.5.7, but I think this might work for all OS X versions) is to not select anything in the trash, and do a Get Info, it gives you the total immediately!



[ Reply to This | # ]