# Telling online-only files from local ones

> iCloud, Dropbox, OneDrive and Google Drive all show a placeholder that looks like a file. One command distinguishes them across every client at once, and the distinction decides what is in your backup.

Canonical: https://bytesweep.app/blog/cloud-files-online-only.html
Last updated: 2026-11-03

## Which of your cloud files are actually on the disk?

An online-only file looks like a file. The Finder gives it a small cloud badge that’s easy to miss, and `ls -l` shows its full size. But the bytes are on a server, which means the file isn’t in your backup, and you can’t open it on a plane.

- By [Shajeen Ahamed](https://bytesweep.app/about.html#author)
- Published 3 November 2026
- Last updated 3 November 2026
- 3 min read
- Part of [Disk space analyzer for Mac](https://bytesweep.app/mac-disk-space-analyzer.html)
- [How we write](https://bytesweep.app/about.html#how-we-write)

Every sync client on current macOS does this the same way: a file provider extension presents the file in the Finder while the data stays remote. Because they share the mechanism, one check covers iCloud Drive, Dropbox, OneDrive, Google Drive and Box at once.

### Logical size against allocated blocks

A file’s logical size is what it claims to be. Its allocated size is how many blocks it actually occupies on the disk. For an online-only file the first is large and the second is zero.

```
find ~/Library/CloudStorage ~/Library/Mobile\ Documents -type f \
  -exec stat -f '%z %b %N' {} + 2>/dev/null \
  | awk '$1 > 0 && $2 == 0 { print }' | head -40
```

`%z` is the logical size in bytes and `%b` the number of 512-byte blocks allocated. A file that claims a size and has no blocks is a placeholder. (The `$1 > 0` test keeps genuinely empty files out of the list.)

*Same command, three files: the ones with a size but zero blocks are placeholders. Example output.*

For totals instead of a list:

```
find ~/Library/CloudStorage -type f -exec stat -f '%z %b' {} + 2>/dev/null \
  | awk '{ l += $1; if ($2 == 0) o += $1 } END {
      printf "logical %.1f GB, online-only %.1f GB, local %.1f GB\n",
      l/1e9, o/1e9, (l-o)/1e9 }'
```

The same split explains why `du` and `ls -l` disagree on a sync folder. `du` counts allocated blocks, `ls -l` and the Finder report logical size. That’s how a sync folder can claim 400 GB on a 500 GB disk without anything being wrong.

### Where each client keeps its folder

| Client | Path |
| --- | --- |
| iCloud Drive | `~/Library/Mobile Documents/com~apple~CloudDocs` |
| Dropbox | `~/Library/CloudStorage/Dropbox` |
| OneDrive | `~/Library/CloudStorage/OneDrive-*` |
| Google Drive | `~/Library/CloudStorage/GoogleDrive-*` |
| Box | `~/Library/CloudStorage/Box-Box` |

Older installations may still have `~/Dropbox` or `~/Google Drive`, either as real directories or as symlinks into `CloudStorage`. Check both.

### Why this decides what’s in your backup

Time Machine copies what’s on the disk. An online-only file has nothing on the disk, so it isn’t in your backup, and it isn’t in a Carbon Copy Cloner or SuperDuper clone either. It exists in one place: your provider’s servers.

That’s fine for things you could get again. It’s not fine for the only copy of your accounts, your photographs, or a client’s work.

Before you cancel a cloud subscription, or leave an employer whose OneDrive you’ve been using, download everything you want to keep. When the account closes, its online-only files go with it, and your local backup won’t have them.

What to back up before any cleanup turns the list from the first command into a routine.

### Pinning files local, or pushing them out

On current macOS there’s no command-line tool for this: the old `brctl download` and `brctl evict` commands are gone. iCloud Drive uses the Finder context-menu items Download Now and Remove Download. Dropbox, OneDrive and Google Drive use their own, “Make available offline” and “Free up space” or their equivalents. Pinning a parent folder pins everything under it, which is the usual reason a streaming setup still fills a disk. The details differ for [Dropbox](https://bytesweep.app/blog/dropbox-smart-sync-disk.html) and for [Google Drive and OneDrive](https://bytesweep.app/blog/google-drive-onedrive-mac.html), and Apple’s own policy is covered in [what Optimise Mac Storage does](https://bytesweep.app/blog/icloud-optimise-storage.html).

You can make everything local on every client. If the disk is the reason you’re using online-only in the first place, that defeats it, so pin what matters and leave the rest.

Before travelling, pin the folders you’ll need and then check, rather than assume:

```
find ~/Library/CloudStorage/Dropbox/current-project -type f \
  -exec stat -f '%z %b %N' {} + | awk '$1 > 0 && $2 == 0' | wc -l
```

You want zero. Any other number is a count of files you won’t be able to open offline.

### Questions

#### Does Spotlight index online-only files?

It indexes their metadata, names and often contents it saw earlier. So a search can find a file that you then can’t open without a connection.

#### Is a zero-block file always online-only?

Inside a sync folder, with a non-zero logical size, yes in practice. Outside one, a sparse file such as a freshly created disk image can claim a large size while holding almost no blocks, so don’t run the check across your whole home folder and read the result the same way.

### Let Bytesweep clear this for you

Skip the commands. Bytesweep finds this for you, rates every item safe, review first or keep, and clears what you choose. Most of what it removes can be put back for seven days. See what it finds on your own disk, free for 3 days, then pay once with no subscription.

[Try it free for 3 days](https://bytesweep.app/download.html) [Buy · $29.99](https://bytesweep.app/pricing.html)

### Keep reading

- [**What “Optimise Mac Storage” really does to your files** The iCloud setting that quietly evicts your files to the cloud, the rules macOS uses to choose them, why it often frees nothing when you need it to, and how to tell what is actually on your disk.](https://bytesweep.app/blog/icloud-optimise-storage.html)
- [**Dropbox online-only files and the space they still use** Dropbox can keep files in the cloud and show them locally, but the placeholders, the cache and the old-version store all cost real disk. Where each lives, how to make files online-only in bulk, and what the hidden cache holds.](https://bytesweep.app/blog/dropbox-smart-sync-disk.html)
- [**Google Drive and OneDrive on a Mac: where the local copies hide** Both use macOS file providers now, and both keep caches outside the folder you can see. The real paths, how to force files online-only, and why the sync folder's size never matches the account's.](https://bytesweep.app/blog/google-drive-onedrive-mac.html)
