Skip to content

Common dry-run flags

Almost every serious CLI has a dry-run mode; the flag differs, the semantics are the same.

  1. rsync --dry-run / -n — lists files that would be transferred.

  2. git commit --dry-run — shows what would be committed.

  3. make -n — prints commands without executing them.

  4. terraform plan — computes the diff before apply.

  5. ansible-playbook --check — runs playbook without making changes.

  6. docker compose --dry-run (experimental) — prints the config that would be applied.

  7. mkdir --dry-run — GNU coreutils 8.x added the flag for consistency.