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

    stevietheb

    Joined:
    Jan 15, 2004
    Location:
    Houston
    #1
    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

    Joined:
    Sep 14, 2004
    Location:
    Brighton/Bristol UK
    #2
    Hmm..

    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 ~

    then
    > 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:

    either
    > 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

    abhishekit

    Joined:
    Nov 6, 2003
    Location:
    akron , ohio
    #3
    -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.

    cheers
     
  4. munkle macrumors 68030

    munkle

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

    stevietheb

    Joined:
    Jan 15, 2004
    Location:
    Houston
    #5
    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