LinuxCommandLibrary

csv-diff

compare CSV files and show differences

TLDR

Diff two CSV files

$ csv-diff [old.csv] [new.csv]
copy
Diff with specific key column
$ csv-diff [old.csv] [new.csv] --key [id]
copy
Output as JSON
$ csv-diff [old.csv] [new.csv] --json
copy
Show only changes
$ csv-diff [old.csv] [new.csv] --show-unchanged
copy

SYNOPSIS

csv-diff [options] old.csv new.csv

DESCRIPTION

csv-diff compares two CSV files and shows added, removed, and changed rows. It's useful for tracking changes in data exports, database dumps, or any tabular data.
Part of the csvkit tools or available as a standalone Python package.

PARAMETERS

--key column

Column to use as unique identifier.
--json
Output in JSON format.
--show-unchanged
Include unchanged rows in output.
--singular name
Singular noun for rows.
--plural name
Plural noun for rows.

SEE ALSO

csvformat(1), diff(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community