Sysadmin · Explorer · Interactive explainer

Rsync include/exclude rule explorer

Paste an rsync filter list, add sample paths, and see which rule wins for each path, including the parent-directory excludes that stop traversal before a later include can help.

Filter list

Target search intent: rsync include exclude order, rsync filter rules, rsync skipping files, and rsync exclude everything except one directory.

Use + pattern to include and - pattern to exclude. Comments starting with # are ignored.

Add trailing / for directories. Paths are treated as relative to the transfer root.

What this page explains

  • First matching rule wins for each file or directory path.
  • Patterns without a slash match a single path component, not the whole path.
  • Patterns ending in / only match directories.
  • An excluded parent directory blocks traversal even if a later file rule would have included a child.

This is focused on the everyday --include / --exclude debugging flow, not every last rsync filter modifier.

Read the launch note for this sysadmin explorer.

Rule summary

Path decisions

Parsed rule list

Common fix patterns

  • For “only copy this nested file”, include each parent directory before the file path.
  • If you exclude *, add a directory include like + */ if you still need traversal.
  • Put broader excludes after the narrower includes they should not override.
  • Use anchored patterns like /build/ when you mean the transfer root, not any matching directory name.

Matching refresher

  • * matches within one path component.
  • ** can cross directory separators.
  • ? matches one non-slash character.
  • A pattern with no slash behaves like a basename match against each path segment.