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


Click here to return to the 'Déjà Vu...' 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 | # ]