LinuxCommandLibrary

diffstat

patch file statistics generator

TLDR

Show diff statistics

$ diffstat [patch.diff]
copy
Show from piped diff
$ diff -u [old] [new] | diffstat
copy
Show with file names
$ diffstat -f [0|1|2|3|4] [patch.diff]
copy
Summarize by directory
$ diffstat -p [1] [patch.diff]
copy

SYNOPSIS

diffstat [options] [file]

DESCRIPTION

diffstat reads output from diff and produces a histogram showing insertions, deletions, and modifications per file. It's commonly used to summarize patch statistics.
Reads from stdin by default, or from specified file.

PARAMETERS

-f format

Filename format: 0=path, 1=name, 2=auto, 3=dir, 4=count.
-p num
Strip num path components.
-w width
Set output width.
-k
Keep temp files.
-l
List files only.

SEE ALSO

diff(1), patch(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community