Skip to content

ls

FunctionLists the contents of the current directory: spaces at /, or child pages elsewhere.
Options-l / --format=long — one item per line with details. --format csv / --format=csv — CSV (header + RFC 4180). Flags may appear before or after PATH.
LimitationsAt most one PATH. Wildcards (*, ?) work only in the last part of a path. Shell ignores wildcards elsewhere in a path. No > redirect; CSV prints to the terminal (pipe to less / grep / head or copy).

At /, ls includes global, personal, collaboration, and knowledge_base spaces. Archived spaces aren’t shown. cd into a space by its name the same way for all of these types.

Without -l / --format, names are shown in columns. When the output is piped, each name is on its own line.

Long format columns:

  • pages: id status vN owner date title url
  • spaces (root): type status id owner created name url

date on pages is last update (version.createdAt; same clock as find -mtime), local YYYY-MM-DD HH:MM. At the site root, spaces show created (spaces have no last update). owner is an Atlassian accountId (display names are not shown).

Machine-readable processing should use --format csv, not -l. CSV uses a header row, RFC 4180 quoting, and UTC ISO timestamps.

-l / --format csv under a space or page makes one extra request per 250 pages. find -mtime uses the search index and may lag ls -l right after edits.

$ ls
$ ls -l
$ ls -l ./MySpace
$ ls --format csv
$ ls --format=csv /MySpace | less
$ ls | grep foo
$ cd WebLinkTestSpace
$ ls -l