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

Display the disk space used by the trash System
I saw on a forum someone complaining that when emptying the trash it doesn't tell you how much disk space it takes up. I think this should do the trick if you really want to know. Open up a Term window and type:
 % cd ~/.Trash
% du -s
My trash was 4931400 bytes; about time I emptied!

[Editor's note: You can accomplish the same result without using the terminal. Select Go -> Go to Folder (or command-tilde) in the Finder and enter ~/.Trash. You'll now see a semi-transparent '.Trash' folder in your main Finder window. Click on it and do Show Info (command-I) and you should see how much stuff is in the trash.]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[3,182 views]  

Display the disk space used by the trash | 6 comments | Create New Account
Click here to return to the 'Display the disk space used by the trash' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way...
Authored by: lollox on Mar 26, '02 04:43:23AM

I found another way for this hint. Maybe easier (...you say it).
Just open the Trash Window and open the contex-menu by ctrl-clicking the contents of the trash window. Choose "Show Info"... that's all!
Lorenzo



[ Reply to This | # ]
Invisible files
Authored by: eagle_eyes on Mar 26, '02 09:45:05AM

but would this include information about any invisible files that happen to be in the trash?



[ Reply to This | # ]
check your units
Authored by: wngdn on Mar 26, '02 09:49:51AM

The original hint was mistaken about units. "du -s" reports 512-byte blocks, not bytes. "du -sk" will give you K, which is an easier unit to think about.

(This silly behavior is enshrined in the POSIX spec, so we're all stuck with it.)



[ Reply to This | # ]
It can be done in 1 line
Authored by: Moo0 on Mar 26, '02 10:38:53AM

just do:
du ~/.Trash -hs

which will give a human-readable output (eg, 26GB, 3MB etc.)



[ Reply to This | # ]
-h option not on OS X
Authored by: robg on Mar 26, '02 10:54:26AM
Unfortunately, the version of du (and df) installed with OS X doesn't support the -h "human readable" tag. We published a hint on this back in March (Better disk usage information) which explains how to install newer versions which include the -h option. -rob.

[ Reply to This | # ]
Where the new show info comes in handy
Authored by: jesperk on Mar 26, '02 12:26:29PM

This is where the new show info command behaviour comes in handy:

Click the trash in the dock.

Select All (cmd a)

Show Info (cmd i)

Done

//J



[ Reply to This | # ]