Looking for a way to do this...

Discussion in 'Mac Apps and Mac App Store' started by stevietheb, Nov 12, 2004.

  1. stevietheb macrumors 6502a


    Jan 15, 2004
    I'd like an app or a terminal command (not to good with terminal yet) that will do the following:

    1) Search my entire hard drive
    2) Return a list of all folders with the amount of space they're taking up on my hard drive
    3) Sort the list by hard drive uses (greatest to least)

    Any suggestions?
  2. tombo macrumors member

    Sep 14, 2004
    Brighton/Bristol UK

    your *entire* hard drive? That will output a LOT of stuff to the screen.

    I suggest move into your user 'home' directory to start:
    Terminal commands to follow

    > cd ~

    > du -sk ~/* | sort -rn | head -5

    this is several little 'programs' in one.

    the first bit lists the disk usage, the k 'switch' is for kilobytes, and the ~/* is for all directories within your home dir.

    then 'sort' will sort it biggest first

    then 'head' will show the top 5.

    if you want to know about the whole hard disk, try moving into the root menu:

    > cd /

    then try a list command to see if that's the sort of stuff you want to find out info for:

    > ls

    or better:
    > ls -a (which lists hidden stuff)

    or even better:
    > ls -a | more

    which means you press 'space' for a new page, and 'q' to get out of it..

    play around, especially with the '-5' bit as I'm sure you'll want to see more than that.

    Get back to me if I've got it completely wrong.
  3. abhishekit macrumors 65816


    Nov 6, 2003
    akron , ohio
    -h flag gives the output in more readable format. So I would goto the home by
    cd ~
    then write
    du -s -h *

    If you want to check the root folder
    cd /
    sudo du -s -h *
    It would ask for your password. Because it needs it to access certain folders.

    There is an alternative way through finder.
    Open finder , go in any directory. Then press option+apple+i. Then as you would select different folders, it would tell you the size of each.

  4. munkle macrumors 68030


    Aug 7, 2004
    On a jet plane
  5. stevietheb thread starter macrumors 6502a


    Jan 15, 2004
    Doing the "Get Info" thing was taking too long...so I wanted to view an itemized list all at once.

    The above commands worked just fine (thanks).

    Also check out disksweeper...which was basically what I was looking to find.

    Thanks a bunch!

Share This Page