Nested folder file size in OSX
February 3, 2006 7:42 AM   Subscribe

I use OSX Tiger, and I want (ideally) to see a sorted list (by size) of all files in a folder, including all files in nested folders. Right now, using the Finder, I can only sort-by-size for files in the same level of a folder. But I want to see a sorted list of all of them on or below that level in the hierarchy. Any tips or shareware to help?

Also - bonus sub-question - is there any way to get a sorted list of folder sizes? Because right now I have to an individual "get information" command for any folder before I can see the weight of its contents.
posted by mark7570 to Computers & Internet (11 answers total)
 
For the bonus question: Have you tried going into List view, then going to View -> View Options and ticking 'Calculate all sizes'?
posted by chrismear at 7:51 AM on February 3, 2006


Best answer: You can do this easily in terminal. Open up /Applications/Utilities/Terminal.

The command you want is: ls -lR |sort -n +4

You have to change directories in Terminal to the folder you want. To do this, type cd and then a space. Do not hit return yet!

Drag the folder you are interested in on top of the terminal window. This will paste the full path of the directory into terminal, so you will see something like "cd /Homes/mark7570/mydir/" on the command line. Now hit enter.

Now you are in the proper directory. Type ls -lR |sort -n +4.

Hope that works for you!
posted by rajbot at 7:59 AM on February 3, 2006


You may find WhatSize useful.
posted by chazlarson at 8:09 AM on February 3, 2006


Best answer: try WhatSize

on preview this is a second for whatsize.

Found here, which is an excellent source for OS X goodies.
posted by kingfisher, his musclebound cat at 8:14 AM on February 3, 2006


On windows what I do to see all the files under a given directory is to do a search on that directory with "*" which matches all file names, then I sort the result list by size, or date, or whatever criteria I'm interested in.

I bet you can do something similar with MacOS without going to a command line.
posted by Good Brain at 8:46 AM on February 3, 2006


Response by poster: thanks, all! mefi-ers deliver again.
posted by mark7570 at 9:52 AM on February 3, 2006


Best answer: You might also want to try the freeware Disk Inventory X.
posted by hyperizer at 10:08 AM on February 3, 2006


I think Calculate All Sizes sounds like exactly the Finder option you want (not sure why chrismear's answer wasn't flagged), but there is also an app from the lovely OmniGroup that does something similar. Their DiskSweeper shows you the magnitude of all folders, and works well even before you register it.
posted by olecranon at 10:30 AM on February 3, 2006


I like Disk Inventory X. I used it just this week as I was building a bootable disk image. It quickly let me find a bunch of junk HD video that was on my machine.... Mmmmm, treemaps.
posted by zpousman at 11:58 AM on February 3, 2006


Type the following into a Terminal:
find . -type f -exec du -k {} \; | sort -n

Similar to ls -lR but you get to see full paths. Remove the -type f if you want to include directories and everything below them in the count. Change it to -type d if you want to see only directory sizes.
posted by polyglot at 8:08 PM on February 3, 2006


If you're comfortable with X11 applications, you may want to try KDE's filelight. very nifty representation, lots of info in one graphical glance.
posted by dkg at 9:57 PM on February 3, 2006


« Older How do I deal with my anger over cheating?   |   Relax....Don't Do It Newer »
This thread is closed to new comments.