Cannot find files taking up space on my Macbook Pro

Started Feb 26, 2013 | Discussions thread
Rod Baakkonen
Rod Baakkonen Regular Member • Posts: 413
Re: Cannot find files taking up space on my Macbook Pro

I work with UNIX on my day job. So I do the following all the time at work.

If you are comfortable with the Mac Utility program terminal, this 'find' command will traverse all your directories and sort the files selected by size.

terminal allows you to use UNIX shell commands on your Mac. The command I have below, is just a search command and will do no harm. But care should be used if use terminal for other uses and you are new to UNIX.  ´╗┐Below is a explanation of what the shell commands do:

The 'sudo' allows you to run the 'find' command as 'root'. Being 'root' will allow you access most everything on your machine and you will get very few 'permission denied' messages.

find is a standard Unix search verb. The / says to start at the root directory.

The type -f parameter says only consider files and not directories.

The size parameter I used will show you any file that is larger than 50 meg (size is in 512k blocks).

If you wanted to see files larger than 100 meg, change the +100000 to +200000.

The exec paramater gives a long listing of the files selected, with the 5th column being the size of the file.

The | (pipe) passes the results of the 'find' to a UNIX 'sort' command.

The -n says the column I am sorting on is numeric and the -k5 says sort on the 5th column. The largest files will be a the bottom of the report.

This command should show you hidden files.  The -la on the 'exec' command says to include hidden files.

sudo will prompt you for the password that you use when you login into your Mac.

Depending on your machine and disk attached, this could run for a while. But the files at the bottom of the report should be your largest files. So set it to run and comeback and see what it shows you.

My largest file is a 2.3 gigabyte Google Earth cache file

sudo find / -type f -size +100000 -exec ls -la {} \; | sort -n -k5

-- hide signature --


 Rod Baakkonen's gear list:Rod Baakkonen's gear list
Panasonic Lumix DMC-FZ300 Panasonic Lumix DC-G9 Panasonic Lumix G Vario 14-140mm F3.5-5.6 ASPH. / Power O.I.S Adobe Photoshop CS6 Adobe Camera Raw 7 +1 more
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow