Skip to content

du

FunctionSums attachment sizes under PATH (a page, a space, a folder, or /; default is the current directory). Page body size is not included.
Options-h — human-readable sizes (1.2M). -s — print only the total.
LimitationsUses the Confluence search index, so a just-uploaded file may be missing for a short time. Archived spaces and pages you can’t see are omitted, so totals can be lower than the real storage. Does not read piped stdin. Caps: 5000 results / 250 search pages.

By default, du prints one SIZE<TAB>PAGEPATH line per page that has attachments (path order), then a SIZE<TAB>total (N attachments) line. Sizes are bytes unless you add -h. Attachments on a space homepage roll up under the space path. Attachments on child pages count toward the start path, including pages inside folders.

To see the individual files, use attach find with -size, -mtime, -name, -ls, or --format csv.

$ du
$ du -s
$ du -h ./MySpace
$ du -h -s /DOCS
$ attach find /DOCS -size +10M -ls

Recipe: Find large or old attachments.