Find large files by using the OSX commandline

To quickly find large files to delete if you have filled your startup disk, enter this command on the OSX terminal:

sudo find / -size +500000 -print

This will find and print out file paths to files over 500MB. You can then go through them and delete them individually by typing rm “<file path>”, although there is no undelete so make sure you know you won’t miss them.

2 thoughts on “Find large files by using the OSX commandline”

  1. Thanks for the command – it was verry helpful for me.
    .. but one small thing .. it does NOT show files > 500MB.
    It shows files > 500.000 blocks -> means 250.000 kByte …
    … at least on my mac:
    “man find”
    -size n[ckMGTP]
    True if the file’s size, rounded up, in 512-byte blocks is n.
    – – –
    the command “… -size +500000k …” or “… -size +500M …” would show 500MB.
    you may check it with something like
    “find / -size +500000k -exec ls -al -h {} ;”

    best regards & thanks agin for the command ..
    jürgen

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s