Find Files
Find Files… ⌘F (or ⌥F7) searches the folder you are in and everything below it: on your disk, inside an archive or on a server. The results come up as a panel, and you work with them like with any folder.
The dialog
- Search in: the folder you are in. To search somewhere else, go there first.
- Changed in git: Yes lists what git says changed in the folder instead of searching every file. See Changed in git.
- Name: what the names should look like, for example
*.mp3. - Content: text that should be inside the files.
- Aa beside each field matches case, and .* makes it a regular expression.
Fill in Name, Content or both (or neither, with Changed in git), and press Find or Enter. Each field remembers its last ten searches: ↓ in the field, or the ⌄ at its end.
Name
*stands for any run of characters,?for exactly one.- Without a wildcard, the text can be anywhere in the name:
mixfindssummer-mix-01.mp3. - With a wildcard, the pattern has to fit the whole name:
*.mp3finds every MP3,IMG_????.jpgfindsIMG_1234.jpg. - Case doesn’t matter unless Aa is on.
- Only the name is matched, not the folders above it. One pattern at a time.
With .* on, Name is a regular expression, and it may match any part of the name: ^\d{4}- finds names starting with four digits and a dash.
Content
Content finds files that hold the text on one line. Without .*, it is the text exactly as you type it, spaces included. With .* on, it is a regular expression, still within one line.
- An empty Name with Content filled in searches every file.
- Files that look binary (a zero byte in their first 8 KB) are skipped. UTF-16 text is searched when it starts with its mark (a BOM); without one its zero bytes make it look binary, so it is skipped.
- Each file is read only up to its first match.
- On a server, every file has to be downloaded to be searched, which takes as long as downloading it.
The results
The results open in the panel you searched from, or in a new tab beside a locked one. The path shows a step for the search itself, such as *.mp3 · chorus.
- Results arrive while the search runs. Until the first one, the panel says Searching….
- Each result’s name is its path below the folder you searched:
Assets/Audio/music-main-theme.wav. - A content search adds the Content column: the first matching line, with the match highlighted.
- The part of a name that matched is highlighted too.
- A search stops at 10,000 results, and the status bar says so. Folders that couldn’t be read are counted there too.
Results are a snapshot: they don’t change by themselves, except that what you delete through Commander disappears from them. To search again, start a new search from the folder.
Working with results
These work, on each file where it really is: View F3, Open in Text Editor F4, Copy to Other Panel F5, Move to Trash, Delete Permanently, Copy Files, Detail, Pack and Add Bookmark.
These don’t:
- Move F6 and Cut Files: A search’s results cannot be moved yet.
- Rename, Multi Rename and Compute Size: Not in a search’s results.
- Find Files again: A search cannot be searched.
A copy from search results is flat: every file lands right in the destination, so two results with the same name ask about it there.
Going to a result
Enter on a result opens its folder with the cursor on it, for a folder as well. The search stays in the path, so Go Up Backspace returns to the results. Back ⌥← from the results goes to the folder you searched.
The search keeps running while it is in the path. Go elsewhere and it stops.
What is searched, and what isn’t
- Hidden files are searched too. Whether you see them is up to the eye in the status bar, and changing it shows or hides them without searching again.
- Symlinks are not followed. A link can be found by its name, but what it points to isn’t searched.
- The search stays on one disk. A disk mounted inside the folder is listed, not entered.
- Archives inside the folder are not searched inside. Go into an archive first, then search it.
- Folders that can’t be read are skipped, and counted in the status bar.
On Windows, a search started from the list of drives searches every drive.
Tags
On a Mac, Enter on a tag in Places searches for files with that tag, anywhere Spotlight indexes. With several tags, a switch in the status bar chooses between files with any of them and files with every one. Tag results follow your disk: files come and go as tags change.
Tips
- Every PDF in a project: Name
*.pdf. - Where is this used? Content with the word, Name
*.rsor whatever kind of file it is. - Big files: search with Name
*, then sort the results by Size. - Search a zip: go into it with Enter, then Find Files.