> ## Content Index
> Fetch the complete content index at: https://macfixly.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Find Large Files in Mac Terminal: Step-by-Step Guide
- URL: https://macfixly.com/find-large-files-mac-terminal/
- Published: 2026-10-15T18:05:00.000Z
- Updated: 2026-10-15T18:05:00.000Z
- Description: Discover step-by-step instructions to find large files in Mac Terminal and manage your disk space efficiently using command-line tools.
- Author: Macuser
- Tags: Mac Terminal, File Management, Disk Space, Command Line

Your Mac's storage feels tight, and you suspect some files are hogging space. Navigating Finder to locate these large files can be slow and cumbersome.

This article guides you through how to find large files in Mac Terminal, offering clear, step-by-step instructions. You'll learn multiple command-line methods, how to interpret their outputs, and which approach suits your needs best for [effective disk space management](https://macfixly.com/optimize-mac-storage-performance/).

## Key takeaways

- Use the **find** command with size filters to locate files above a specific size threshold.
- **du** combined with sorting helps identify largest directories and files efficiently.
- **locate** and **mdfind** offer quick filename-based searches but differ in indexing and speed.
- Check file sizes directly with **ls -lh** for readable output.
- Opening files from Terminal can be done with **open** command for quick access.

## Before you start: what you need to use Mac Terminal for finding large files

Using Terminal to find large files on your Mac requires basic familiarity with command-line navigation and file system structure. Terminal gives you direct control over file management, often revealing details that Finder or third-party apps might miss or display less efficiently.

First, you need to open Terminal. You can do this by opening the Finder, selecting **Applications** \> **Utilities**, and then double-clicking **Terminal**. Alternatively, use Spotlight by pressing **Command + Space** and typing "Terminal".

Once Terminal launches, you'll see a command prompt displaying your current directory. To confirm your location, type **pwd** (print working directory) and press Enter. The output shows the [full path to your current folder](https://macfixly.com/show-full-path-finder-mac-terminal/).

Next, use **ls** to list files and folders in the current directory. This helps you understand what files are accessible before running size-related commands.

1. Open Finder and navigate to **Applications > Utilities**.
2. Double-click **Terminal**; a window with a command prompt appears.
3. Type **pwd** and press Enter; you should see your home directory path like */Users/yourname*.
4. Type **ls** and press Enter; this lists files and folders in your current directory.

Understanding file paths is key: Mac uses a hierarchical system where folders contain files or other folders. Permissions control who can read or modify files; Terminal commands run with your user privileges, so some directories may require elevated access.

Terminal is especially useful for finding large files because it can quickly scan any directory, apply filters, and output precise results without graphical overhead. Unlike Finder, Terminal commands can be scripted or customized to suit your specific needs, and unlike some third-party apps, Terminal doesn't require installation or additional permissions.

## How to find large files on Mac using the 'find' command

The **find** command is a powerful tool for locating files based on their size. You can specify size filters to target files larger than a certain threshold, such as 100 megabytes.

1. Open Terminal and enter a command like *find /path/to/search -type f -size +100M*. This will list all files larger than 100 megabytes in the specified directory and its subdirectories. For example, *find \~/Documents -type f -size +100M* searches your Documents folder.
2. After running the command, you should see a list of file paths that meet the size criteria. The output does not include file sizes by default, only paths.
3. To search your entire system, use *find / -type f -size +100M 2>/dev/null*. The *2>/dev/null* part suppresses permission denied errors that are common when searching system directories.
4. If you want to find files larger than 1 gigabyte, change the size parameter accordingly: *\-size +1G*.
5. For more readable output showing file sizes, you can combine **find** with *ls -lh* or use *xargs ls -lh*, but that adds complexity and may slow the process on large directories.

Using the **find** command with size filters gives you precise control over which files to locate, allowing you to tailor searches to specific folders or the entire system efficiently.

## How to find largest files on Mac with 'du' and sorting

The **du** command calculates the disk usage of files and directories, providing a way to identify large items by size. Unlike the *find* command, which targets individual files, *du* reports directory sizes as aggregates of their contents, which can help you spot space-hogging folders.

![How to find largest files on Mac with 'du' and sorting – how to find large files in Mac Terminal](https://macfixly.com/content/images/2026/10/find-large-files-mac-terminal-2.webp)

1. Open Terminal and navigate to the directory you want to inspect, or start at the root by typing `cd /`. You should see no errors if the path is valid.
2. Run `du -sh *` to display the size of each item in the directory in a human-readable format (e.g., K, M, G). This lists sizes without sorting.
3. To identify the largest items, use `du -sh * | sort -hr | head -n 10`. This command sorts the sizes in descending order and shows the top 10 largest files or folders. The output will look like:  
3.4G Documents  
1.2G Movies  
850M Downloads...
4. For a recursive overview including subdirectories, run `du -ah. | sort -hr | head -n 10`. This lists the largest files and directories beneath the current folder, sorted by size.

Remember that directory sizes represent the total space used by all files inside, while file sizes represent individual files. Large directories might contain many smaller files, so interpreting results requires understanding this distinction.

## How to find a file in Mac Terminal using the 'locate' and 'mdfind' commands

Besides the 'find' command, you can use 'locate' and 'mdfind' for faster file searches [by name](https://macfixly.com/p/) in Terminal. Each method has its advantages depending on your needs for speed and accuracy.

### Using the 'locate' command

The 'locate' command searches a prebuilt database of file paths, making it very fast. However, this database may be outdated if not updated regularly.

1. Type **sudo /usr/libexec/locate.updatedb** to update the locate database. This may take a few minutes without visible output.
2. Run **locate filename** replacing *filename* with the file name or partial name you want to find.
3. You will see a list of matching file paths. For example, */Users/username/Documents/filename.txt*.

Keep in mind the locate database updates manually or periodically, so newly created files may not appear immediately.

### Using the 'mdfind' command

The 'mdfind' command uses Spotlight's indexing, providing up-to-date and often more accurate results. It searches file metadata and contents for matches.

1. Type **mdfind "filename"** with the target filename in quotes.
2. The Terminal lists all files matching that name or content, such as */Users/username/Desktop/filename.txt*.
3. Since Spotlight indexes continuously, results reflect recent file changes.

**Comparison:** 'locate' is faster but may miss recent files if the database is outdated. 'mdfind' offers more current and comprehensive results but can be slower on large systems. Use 'locate' for quick, approximate searches and 'mdfind' when accuracy and freshness matter.

## How to check file size on Mac directly in Terminal

To view the size of a specific file on your Mac using Terminal, the **ls -lh** command provides a quick, human-readable format. This shows file sizes with units like KB, MB, or GB, making it easy to understand at a glance.

1. Open Terminal.
2. Type `ls -lh filename`, replacing *filename* with the actual file name or path.
3. Press Enter. You will see a line of information including file permissions, owner, group, size, and modification date. The size appears in a readable format like 2.1M or 512K.

For more detailed file information, including size in bytes, use the **stat** command. This command displays multiple file attributes, helping you distinguish between apparent file size and disk usage.

1. Type `stat filename` and press Enter.
2. The output includes *Size* (the number of bytes) and other metadata such as blocks allocated and file type.

Note that *apparent size* (shown by `stat`) is the actual byte count of the file, while disk usage depends on how data is stored on the disk which can be smaller or larger due to filesystem overhead or compression.

| Command            | Example Output for "example.pdf"                                                                         |
| ------------------ | -------------------------------------------------------------------------------------------------------- |
| ls -lh example.pdf | **\-rw-r--r-- 1 user staff 3.2M Oct 15 10:00 example.pdf**                                               |
| stat example.pdf   | **16777216 bytes 17532 blocks File: example.pdf Size: 3355443 Blocks: 6560 IO Block: 4096 regular file** |

## How to open files from Mac Terminal

Once you locate a file using Terminal, you can open it directly from the command line, saving time switching between apps. The primary command for this is **open**, which launches files with their default applications.

1. Type `open filename` (replace *filename* with your file's name or path). For example, `open document.txt` opens a text file in the default text editor. If the command works, the file will appear in its usual app.
2. To open an image, use `open picture.jpg`. The image will open in Preview or your set default image viewer.
3. If you want to open a file with a specific application, use `open -a "Application Name" filename`. For example, `open -a "TextEdit" notes.txt` forces the file to open in TextEdit even if another app is default.
4. Be aware that some file types may not open properly if the associated app doesn’t support command-line launching or if file permissions restrict access.

Using `open` lets you quickly verify file contents or edit files without leaving Terminal, streamlining your workflow when managing large files.

## Troubleshooting common issues when finding large files in Terminal

### Handling permission denied errors

You might encounter errors like *find:./Library: Permission denied* when searching directories where your user lacks necessary rights. To handle this safely, prepend your command with **sudo** to run it with administrative privileges. For example, `sudo find / -size +100M` prompts for your password and then executes with elevated permissions. Use this cautiously to avoid unintended system changes.

![Troubleshooting common issues when finding large files in Terminal – how to find large files in Mac Terminal](https://macfixly.com/content/images/2026/10/find-large-files-mac-terminal-3.webp)

### When Terminal commands return no results

If your search returns no output, verify the correctness of your file path and command syntax. For example, a typo in the directory path or incorrect size units can cause zero matches. Double-check that directories exist and are accessible. Running `ls -l [path]` helps confirm the path is valid and visible to your user.

### Improving performance for large directory searches

Searching extensive directories can freeze Terminal or take excessive time. To mitigate this, limit your search scope by specifying subdirectories rather than root `/`. Additionally, use options like `-maxdepth` with `find` to restrict recursion depth. For example, `find /Users/yourname -maxdepth 2 -size +100M` scans only two levels deep. Running searches in the background with `nohup` or appending `&` lets you continue working without interruption.

## Comparing Terminal methods with Finder and third-party tools for finding large files

Using Terminal commands gives you speed and flexibility for finding large files. Commands like `find` and `du` run directly on your system, allowing precise searches with customizable filters. They work well for users comfortable with command-line syntax and who want granular control without additional software.

Finder offers ease of use through a graphical interface. Using Finder's "Show View Options" to sort files by size or the "Storage Management" feature provides immediate visual feedback. This method suits users who prefer clicking through folders and seeing file icons and previews.

Third-party apps like DaisyDisk or GrandPerspective provide visual maps of disk usage, making it easy to spot large files and folders at a glance. However, these apps require access to your files, which may raise security and privacy concerns, especially with sensitive data.

| Method            | Advantages                                              | Disadvantages                                                   |
| ----------------- | ------------------------------------------------------- | --------------------------------------------------------------- |
| Terminal Commands | Fast, flexible, no extra installs, precise filtering    | Requires command-line knowledge, no graphical interface         |
| Finder            | Intuitive GUI, built-in, visual previews                | Less flexible filtering, slower for large volumes               |
| Third-party Apps  | Visual disk maps, easy identification, detailed reports | May require permissions, potential privacy risks, extra install |

Choose Terminal when you want exact control and speed without installing software. Use Finder for quick visual checks within familiar macOS tools. Consider third-party apps if you prefer graphical disk usage maps and detailed analysis, weighing the privacy implications carefully.

## Frequently asked questions

### How to find mac terminal?

To find Terminal on your Mac, open Finder, go to the Applications folder, then open the Utilities folder. Terminal is located there as an app named "Terminal." You can also use Spotlight by pressing Command + Space, typing "Terminal," and pressing Enter.

### How to find file in mac?

You can find files on Mac using Finder by opening a Finder window and typing the file name in the search bar at the top right. Alternatively, you can use the Terminal commands like **find** or **mdfind** to search for files by name or other attributes directly from the command line.

### How to find large files in mac os?

To find large files on macOS, you can use Terminal commands like **find** with size parameters or **du** combined with sorting to list files by size. These methods help identify files that occupy significant disk space, enabling you to manage storage more effectively than relying solely on Finder.

### How to see files on mac?

Files on Mac can be seen through Finder, which provides a graphical interface to browse folders and files. In Terminal, you can use commands like **ls** to list files in a directory, with options such as `-l` for detailed information or `-a` to include [hidden files](https://macfixly.com/show-hidden-files-mac-terminal/).

### How to open file in terminal mac?

You can open files from Terminal using the **open** command followed by the file name or path. For example, `open filename.txt` will open the file with its default app. This works with documents, folders, and applications and is useful for quickly accessing files without leaving the command line.

## What this guide does not cover and when to seek alternatives

This guide focuses on using built-in Terminal commands and does not cover third-party software installation or usage. While such tools often offer more user-friendly interfaces and detailed visualizations for finding large files, they may come with privacy and security trade-offs that some users prefer to avoid.

If you are uncomfortable with command-line interfaces or need advanced features like automatic cleanup suggestions, graphical disk usage maps, or scheduled scans, exploring reputable third-party applications might be a better fit. However, always download software from trusted sources and review privacy policies to ensure your data remains secure.

To take the next step, try running the **find** command with size filters on a specific directory where you suspect large files reside. This targeted approach helps you quickly identify storage-heavy files without scanning the entire system, saving time and reducing terminal output clutter.