Label stale pages for review
Mark old pages so owners can review them — without opening each page. Find pages by last update with find -mtime, add a label to all of them with label add, then list the labeled pages later with find -label.
1. Find the stale pages
Section titled “1. Find the stale pages”$ cd YourSpace$ find . -mtime +365 -prune$ find . -mtime +365 -prune | wc-mtime +365 means not updated for more than a year. -prune keeps only the top-most match in each subtree.
2. Preview, then add the label
Section titled “2. Preview, then add the label”$ find . -mtime +365 -prune | label add needs-review -n$ find . -mtime +365 -prune | label add needs-review -y-n shows which pages would be labeled. -y writes. At most 100 pages per run — add | head 100 and run again for larger sets. You can add up to 10 labels at once (label add needs-review stale-2026 -y).
3. Track the review
Section titled “3. Track the review”$ find -label needs-review$ find -label needs-review --format csv$ find . -label needs-review -mtime +365find -label uses the Confluence search index. Right after label add, it may take seconds to minutes before new labels show up.
When a page has been reviewed, remove the label:
$ label rm needs-review ./Reviewed-page -yWhat happens next
Section titled “What happens next”Labeled pages can then go to the archive (find -label needs-review | archive -n) or be moved under an Archive page with mv in the same space.
- Pages only. Spaces are skipped and folders are refused.
- Labels are written with the
globalprefix (team:/my:are not supported). - Label names come before paths; write paths with a slash (
./Page). - No new app permissions are used.