Skip to content

Export page list as CSV

You need a machine-readable list of children under the current space or page — for a spreadsheet, a script, or a quick inventory — without leaving the Shell console.

Use ls --format csv (also ls --format=csv). Output is a header row plus RFC 4180 fields, with UTC ISO timestamps. Shell prints to the terminal only; there is no > redirect to write a file from the console. Copy from the terminal if you need the rows elsewhere.

Watch on YouTube: youtu.be/f357fw69aCk

$ cd YourSpace
$ ls --format csv
$ ls --format=csv ./Projects

Both spellings are valid. Run after cd so the listing matches the parent you care about.

Export search results with find —format csv

Section titled “Export search results with find —format csv”

To export what find matched (for example, stale pages across a tree) instead of one location’s children, use find --format csv. It prints the same columns as ls --format csv plus a trailing path column. find -ls prints the same hits as a padded, human-readable listing (id, status, version, owner, last update, title, path, url). Don’t pipe -ls or --format csv output into mv, cp, rm, label, or archive — those expect plain path lines from a bare find.

$ find ./MySpace -mtime +365 --format csv
$ find ./MySpace -ls

For a readable table in the console, use richer ls -l (id, status, version, owner, last-update date, title, url). For anything automated, prefer --format csv — do not parse -l lines.

$ ls -l
$ ls -l ./Projects

On pages, date is last update (same clock as find -mtime), local YYYY-MM-DD HH:MM. At the site root, spaces show created (spaces have no last-update field).

  • Terminal output only — no shell redirect to save a .csv file.
  • -l / --format csv under a space or page may make one extra request per 250 pages.
  • Navigation and listing only in this recipe; see Limitations.