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
List children as CSV
Section titled “List children as CSV”$ cd YourSpace$ ls --format csv$ ls --format=csv ./ProjectsBoth 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 -lsPrefer human columns? Use ls -l
Section titled “Prefer human columns? Use ls -l”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 ./ProjectsOn 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
.csvfile. -l/--format csvunder a space or page may make one extra request per 250 pages.- Navigation and listing only in this recipe; see Limitations.
- Shell for Confluence on Marketplace
- User guide
- Move selected Confluence pages to another parent —
mvafter find by name or last update (max 100) - Find pages not updated recently —
find -mtime(optional-prunebeforemv -n)