Reorganize pages
Use Shell when you already know the pages, or when you can match them by title with find -name. All of these commands stay in a single space. Run them after cd YourSpace (you can’t mkdir at /). Preview writes with -n / --dry-run before you run them for real.
Preview a title-pattern move, then run it
Section titled “Preview a title-pattern move, then run it”Use a glob on source paths or pipe paths from find:
$ mkdir ./Archive$ mv -n '*2023*' ./Archive$ mv '*2023*' ./Archive$ find . -name '*2023*' | mv -n ./Archive$ find . -name '*2023*' | mv ./ArchiveThe dry-run reports how many pages would move and which would fail. Drop -n only after the preview looks right.
find prints the start path first, then descendants. A -name filter applies to that start path too, so . is included only if the current page title matches.
At most 100 sources per mv or cp (the same cap as piped sources). Split larger sets and run again.
Move or rename named pages
Section titled “Move or rename named pages”$ mv pageA pageB pageC ./Parent$ mv oldTitle newTitle$ mv ./page ./otherParentWith two paths, an existing destination becomes the new parent. If the destination does not exist and contains no /, Shell renames the source.
You cannot move a page into itself or into one of its descendants. You cannot move spaces or copy pages across spaces.
Related: mv
Copy a template and check for title conflicts
Section titled “Copy a template and check for title conflicts”$ cp Template 'Weekly 2026-09-23'$ cp --dry-run pageA pageB ./folder$ find ./Drafts -name 'Weekly*' | cp -n ./Archive$ find ./Drafts -name 'Weekly*' | cp ./ArchiveWith two paths, an existing destination becomes the copy’s parent. If the destination does not exist and contains no /, Shell creates a sibling with that title.
Live copies skip a source when the destination already has that title (the same conflict handling as dry-run). If one source fails, Shell keeps the successful copies.
Related: cp
Build a skeleton, then delete leftovers
Section titled “Build a skeleton, then delete leftovers”$ mkdir ./Projects$ touch ./Projects/Overview$ ls -l | grep -i draft$ rm -y ./OldDrafttouch / mkdir create one empty page. The parent must already exist.
rm (alias del) deletes one page or space and requires -y / --yes. It does not read piped paths. Confirm the name with ls or find first, then pass that path to rm.
- Same space only. Cross-space bulk moves are out of scope.
- If one source fails, successful moves or copies are kept.
- Press Esc or Ctrl+C to stop a long
find.