Skip to content
Edith

Docs

Command reference

ed studio compare-folders

Back to ed studio

Compares two folders recursively and reports each relative path as only in the left folder, only in the right folder, changed or identical. Neither folder is changed.

Terminal
ed studio compare-folders ./before ./aftered studio compare-folders ./before ./after --exclude '*.tmp' --exclude 'cache/*'ed studio compare-folders ./before ./after --include-ignored --json
Argument or flag What it does
<left>, <right> The folders, absolute or relative to the current directory.
--exclude <pattern> Skips a shell-style pattern. Repeat it for more. A pattern without / matches a name at any depth; a pattern with / matches the path from the folder root.
--include-ignored Also compares .git, .DS_Store, node_modules and .build, which are skipped by default.
--json Emits left, right (folder paths), exclusions and items. Each item has path, status (onlyInLeft, onlyInRight, changed, identical) and the left and right kind (file, directory, symlink, other), which is absent on the side that lacks the path.

Plain output prints one tab-separated status and path per line and a count of each status on stderr.

How it compares:

  • Regular files compare their bytes in 128 KiB chunks, even when sizes and dates match. Equal sizes never make two files identical on their own.
  • Symbolic links compare their target text and are never followed, so loops and broken links are safe. The folders you pick must be real folders, not links.
  • A folder is changed when anything inside it differs. Empty folders are listed.
  • Names match exactly, including case. Hidden files are included unless a pattern skips them. Skipped folders are not read at all.
  • Pipes, sockets and devices, unreadable files, more than 100,000 items in a folder, folders nested deeper than 255 levels, and files that change during the comparison stop it with an error instead of reporting them as identical.

In Studio, open the Folders tab, choose the left and right folders, edit the skipped names and choose Compare folders. Filter by status, search paths, swap the sides or cancel a running comparison. Select an image, PDF or video and choose Open left or Open right to edit it in Studio, or Compare PDFs for a PDF on both sides. The last results stay while a new comparison runs.

All ed commands