Linux command
daff 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Compare two CSV files and show differences
daff [file1.csv] [file2.csv]
Compare with colored output
daff --color [file1.csv] [file2.csv]
Save diff output to a file
daff --output [changes.csv] [file1.csv] [file2.csv]
Apply a patch to update a file
daff patch [file.csv] [changes.csv]
Apply a patch in place
daff patch --inplace [file.csv] [changes.csv]
Three-way merge with a common parent
daff merge [parent.csv] [local.csv] [remote.csv]
Render a diff as HTML
daff render --output [diff.html] [diff.csv]
Copy/convert between formats
daff copy [input.csv] [output.tsv]
说明
daff is a data diffing tool designed for comparing tabular data such as CSV files, database tables, and spreadsheets. It provides git-like diff and patch operations specifically optimized for structured data formats. The tool can detect added, removed, and modified rows and columns, represent differences in various formats including HTML and colored terminal output, and apply patches to update data files. It's particularly useful for tracking changes in data exports, database dumps, and collaborative data editing workflows.
FAQ
What is the daff command used for?
daff is a data diffing tool designed for comparing tabular data such as CSV files, database tables, and spreadsheets. It provides git-like diff and patch operations specifically optimized for structured data formats. The tool can detect added, removed, and modified rows and columns, represent differences in various formats including HTML and colored terminal output, and apply patches to update data files. It's particularly useful for tracking changes in data exports, database dumps, and collaborative data editing workflows.
How do I run a basic daff example?
Run `daff [file1.csv] [file2.csv]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more daff examples?
This page includes 8 examples for daff, plus related commands for nearby Linux tasks.