Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

It seems that either one of these commands can be used:

sudo find / -size +1G
sudo find / -type f -size +1G

But when it gets to /Volumes, it actually look at all the back up files by Time Machine in the external hard drive. (and another hard drive for data).

I was going to cd to /Volumes/Macintosh HD and start the find there using find . instead of find /, but then I did an ls and there is a Volumes right there again.

Any option to use the Finder as well (the GUI)?

Another thing I found puzzling is that none of the manpage of find on Mac OS Lion or on the web mentioned the +1G... all they mentioned were the format 1G for exact match.

share|improve this question

4 Answers 4

up vote 3 down vote accepted

You can use the -x to avoid traversing mounted drives:

-x      Prevent find from descending into directories that have a device number different than that of the file from which the descent
        began.

You command should then be

$ sudo find -x / -type f -size +1G

Regarding the fact about the missing documentation: is not missing is just not easy to find. At the end of the PRIMARIES section of the man page

All primaries which take a numeric argument allow the number to be preceded by a plus sign ("+") or a minus sign ("-"). A preceding plus sign means "more than n", a preceding minus sign means "less than n" and neither means "exactly n".

share|improve this answer

If you want to go for a GUI tool, I use

http://www.whatsizemac.com/ or http://www.omnigroup.com/products/omnidisksweeper/

Whatsize can also find duplicates an has some extra features.

share|improve this answer

This will probably come out with slightly different results than find but you could use Spotlight.

In a Finder window, start a Spotlight search and choose the File Size and also System files from the drop down menu.

If you are looking to do this on the command line, you can use:

mdfind "kMDItemFSSize >$[1024*1024*1024]"

In a test on my machine, the Spotlight search didn't find a couple of large files that were in the trash or one or two system files (like sleepimage). It also treated packages (such as applications and some VM images) differently from find. On the upside though mdutil was nearly instant rather than taking a few minutes for the find command to trawl through my disk.

share|improve this answer

How about this command:

find / -type f -size +1G
share|improve this answer
    
you mean just remove the sudo? But I want to find any system file that is more than 1GB too... (such as .dmg downloaded by the App Store) –  動靜能量 Jun 6 '12 at 9:39
    
And it doesn't solve the problem anyway because drives mounted in /Volumes are typically readable without sudo. –  patrix Aug 18 '12 at 13:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.