How to search for files by size on a Mac, in Finder or Terminal
· 6 min read
In Finder, press Command-F, click the plus button, set the first pop-up to File Size, choose is greater than or is less than, and type a number in KB, MB or GB. Add a second File Size row to search a range. In Terminal, find ~ -size +500M walks your home folder for files over 500 MB, and mdfind "kMDItemFSSize > 500000000" asks the Spotlight index the same question in a fraction of the time.
This is size as a filter, not a cleanup. You are looking for the 2 GB export you know you made, the PDF small enough for an upload form, or the zero-byte files a failed download left behind. If what you actually want is the biggest things on the disk so you can delete them, find the largest files on a Mac is the better guide.
Add a File Size row in Finder
- Open a Finder window. If you know roughly where the file is, open that folder first.
- Press Command-F. Choose the scope in the row under the toolbar: This Mac, or the folder’s name.
- Click the plus button at the right of that row. A new row appears, usually reading Kind is Any.
- Click the first pop-up. If File Size is listed, choose it. If it is not, choose Other…, type
sizeinto the search box in the sheet that opens, select File Size, and tick the checkbox beside it so it appears in the short menu next time. The exact layout of that sheet varies a little between versions. - Set the second pop-up to is greater than or is less than, type a number, and pick KB, MB or GB from the last pop-up.
Results update as you type. Press Command-2 for List view, right-click a column heading to switch on Size, and click Size to sort.
The operators on recent versions are equals, is greater than, is less than and is not. Avoid equals: almost no file is exactly the round number you remember, so “equals 2 GB” will not turn up a file of 2.04 GB. A narrow range finds it.
Search a size range, and stack other filters
Every row in a Finder search must be true at once, which is what makes ranges work.
- Add a File Size row: is greater than 1.5 GB.
- Click the plus button again and add a second File Size row: is less than 2.5 GB.
- Add whatever else you remember. Kind is Movie for the export. Name contains
final. Last modified date within last 30 days.
Three loose memories (“it was big, it was a video, it was last month”) together usually narrow a whole Mac to a handful of results, which is the point of searching by size at all. Finder search tips that actually narrow things down covers the nested Any and None groups if you need “this or that” conditions.
Two ranges worth keeping as Smart Folders (click Save at the right of the scope row): PDFs under 10 MB for upload forms, and anything over 1 GB in Downloads.
Finder search runs on the Spotlight index when the scope is This Mac, so locations excluded from Spotlight return nothing. Files inside ~/Library only appear if you add an Other row for System files set to are included.
Search by size with find
find walks the folders itself and ignores the Spotlight index entirely, which makes it slower but thorough.
find ~/Documents -type f -size +500M
That lists files over 500 MB under Documents. For a range, give it two conditions, which must both be true:
find ~ -type f -size +100M -size -200M 2>/dev/null
The 2>/dev/null hides the “Permission denied” lines from folders Terminal is not allowed to read. Add a name filter to narrow further, such as -name "*.mov", and see each result’s size by adding -exec ls -lh {} + after the conditions.
The rounding trap. The macOS manual for find says sizes are rounded up before they are compared, and in our testing that rounding is to the unit you give. So -size -1M (under one megabyte) matched only an empty file, because anything with even one byte rounds up to 1M, and -size -2M skipped a 1.5 MB file, because it rounds up to 2. When the boundary matters, use a smaller unit (-size -1024k) or exact bytes with c (-size -1048576c).
Empty files have their own test, which is clearer than any size:
find ~/Downloads -type f -empty
Units differ from Finder. In find, M means 1,048,576 bytes. Finder reports sizes in decimal, where a megabyte is a million bytes. A file Finder calls 500 MB is about 477 M to find, so leave some margin either side.
Search by size with mdfind
mdfind queries the Spotlight index, so it answers almost instantly but only covers indexed places. Sizes are in bytes:
mdfind "kMDItemFSSize > 500000000"
That is anything over 500 MB, in Finder’s decimal sense. A range uses &&:
mdfind -onlyin ~/Documents "kMDItemFSSize > 100000000 && kMDItemFSSize < 200000000"
Combine size with a type to find, for example, every movie over 100 MB:
mdfind 'kMDItemFSSize > 100000000 && kMDItemContentTypeTree == "public.movie"'
Add -attr kMDItemFSSize to print each file’s size next to its path, and -count to get just the number of matches. To check what size Spotlight has recorded for a particular file, run mdls -name kMDItemFSSize followed by its path. mdfind: searching a Mac from the Terminal covers scoping, other attributes and piping results into other commands.
Which method to reach for
- Finder when you want to look at the results, preview them with Space and drag them somewhere.
- mdfind when you want a list fast and the file is in an ordinary, indexed location.
- find when Spotlight is excluded, broken or still indexing, or when you need exact byte boundaries.
All three only see what is mounted. A file on an external drive in a drawer is invisible to them until you plug the drive in.
If you search like this regularly, Everywhere is a Mac file search app that catalogs every file on the Mac once and narrows the results as you type. Instead of criteria rows it has operators, suggested as you type: size:, ext: for a file type and path: for a folder, and Command-/ lists every operator and shortcut. It also finds mail attachments inside the Mail store, originals inside the Photos library, and files on an external drive that is currently unplugged, shown dimmed with the name of the drive to connect. It searches names and paths, not the text inside documents, so a size search combined with a phrase from a document’s contents is still a Finder or mdfind job.
Questions
Can I search for files smaller than a certain size?
Yes. In Finder, use File Size is less than. In Terminal, use a minus sign with find (remembering the rounding: use k or c near small boundaries) or a less-than comparison with mdfind.
Why does Finder find nothing when I know a file that size exists?
Usually scope or the index. Check the scope row says This Mac or the right folder, remove leftover rows from an earlier search, and try the same search with find, which does not depend on Spotlight. If find sees the file and Finder does not, Spotlight cannot find a file you know exists covers the usual causes.
How do I search by size on an external drive?
Open the drive in Finder, press Command-F and choose the drive’s name as the scope before adding the File Size row. In Terminal, point the command at the drive: find /Volumes/DriveName -type f -size +1G.
Does a folder count as one big file in a size search?
No. Spotlight records no size for a folder, and the find commands above are limited to files with -type f, so a folder holding 40 GB of small photos never appears in any of these searches. To rank folders by their total, du -sh ~/* | sort -h is the command.