# Open Files and Ports

Canonical page: https://vitalsmac.com/glossary/open-files-and-ports

Activity Monitor glossary, When something goes wrong. What are Open Files and Ports in Activity Monitor?

Also: open files, file in use

**Short answer:** Open Files and Ports is a tab in the window Activity Monitor opens for a single process. It lists every file, folder and network connection that process has open at that moment.

A process keeps a file open while it reads or writes it, and macOS will not eject a disk, or let the Trash delete a file, while one is open. The list shows what a process is holding.

It covers one process at a time, so it answers what an app has open, not which app has a file open. For that, use `lsof` in Terminal.

## How to open it

The tab is in the window Activity Monitor opens for a process.

1. Open Activity Monitor and find the process.
2. Double-click it, or select it and click the Info button in the toolbar.
3. Click Open Files and Ports.

## What the list contains

The first lines are the folder the process works in and the program itself. After them come the libraries it loaded and the files it has open, and at the end its network connections, with their addresses and ports.

## Why some processes show nothing

Activity Monitor cannot always read the open files of processes that belong to macOS or to another user, and the tab can be empty for them.

## Questions people ask

### How do I see open files on a Mac?

In Activity Monitor, double-click a process and click Open Files and Ports. In Terminal, `lsof` lists them for every process.

### Can Activity Monitor search for a file across all processes?

No. It shows one process at a time. `lsof` followed by the file's path names every process that has it open.

## In Vitals

Vitals turns the question round: its Open Files section lists every disk with the apps holding files on it, and typing a file's name finds whichever app has it open. The Process Inspector shows one process's open files and ports too.

## Related

- [lsof](https://vitalsmac.com/glossary/lsof)
- [Listening port](https://vitalsmac.com/glossary/listening-port)
- [PID](https://vitalsmac.com/glossary/pid)
- [Sample Process](https://vitalsmac.com/glossary/sample-process)

Looking for something better than Activity Monitor? See [the best Activity Monitor alternatives for Mac](https://vitalsmac.com/best-activity-monitor-alternatives), or [every term in the glossary](https://vitalsmac.com/glossary).
