Reorganize pages
Use Shell when you already know the pages, or when you can match them by title with find -name. Run them after cd YourSpace (you can’t mkdir at /). Moves and copies can also target another space — a cross-space mv needs -y / --yes. 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 or copy 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 and report it (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) moves pages to the trash and requires -y / --yes. Pass one or more paths, a glob, or pipe paths from find (max 100; preview with find … | rm -n). A space can only be deleted on its own. To copy a whole page tree, use cp -r.
- A cross-space
mvneeds-y/--yes; same-space moves do not. - If one source fails, successful moves or copies are kept.
- Press Esc or Ctrl+C to stop a long
find.