Linux command
dyff 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Compare
dyff between [file1.yaml] [file2.yaml]
Compare
dyff between -k [manifest1.yaml] [manifest2.yaml]
Show
dyff between -o json [file1] [file2]
Compare
dyff between -r [dir1] [dir2]
说明
dyff is a diff tool specifically designed for YAML and JSON configuration files. Unlike traditional line-based diff tools, it understands the structure of YAML/JSON documents and shows meaningful differences at the semantic level. The tool is particularly useful for comparing Kubernetes manifests, configuration files, and structured data where the order of keys doesn't matter but their values do. It can ignore certain types of changes (like metadata timestamps) and provides various output formats.
参数
- between _FILE1_ _FILE2_
- Compare two files
- -k, --kubernetes
- Compare Kubernetes manifests (ignore metadata timestamps)
- -r, --recursive
- Compare directories recursively
- -o, --output _FORMAT_
- Output format: human, json, yaml, tap (default: human)
- --chroot _PATH_
- Chroot both inputs to a specific path
- --ignore-order-changes
- Ignore changes in list order
- --ignore-value-changes _PATH_
- Ignore value changes at specific path
- --no-table-style
- Disable table output styling
- -v, --version
- Display version and exit
- -h, --help
- Display help and exit
FAQ
What is the dyff command used for?
dyff is a diff tool specifically designed for YAML and JSON configuration files. Unlike traditional line-based diff tools, it understands the structure of YAML/JSON documents and shows meaningful differences at the semantic level. The tool is particularly useful for comparing Kubernetes manifests, configuration files, and structured data where the order of keys doesn't matter but their values do. It can ignore certain types of changes (like metadata timestamps) and provides various output formats.
How do I run a basic dyff example?
Run `dyff between [file1.yaml] [file2.yaml]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does between _FILE1_ _FILE2_ do in dyff?
Compare two files