DIFF(1)

πŸ“¦ version 1.053, in alpine 3.24

πŸ’– DIFF(1) β€” from User Contributed Perl Documentation, bestie πŸ’–

✨ NAME ✨

diff β€” compute intelligent differences between two files. that's the whole name, no cap πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so the whole synopsis is literally this, copy it exactly:

diff [-c | -C lines | -e | -f | -q | -s | -u | -U lines] file1 file2

πŸ’… DESCRIPTION πŸ’…

The diff command compares file1 and file2, producing a listing on standard output describing how to convert one file to the other. it's giving β€œhere's exactly what changed” energy. Various formats are available for representing the file changes. By default the output is in the traditional UNIX diff format. classic, iconic, default behavior.

🚨 Real talk: two directories cannot be compared. If either file1 or file2 is a directory, diff is applied to the non-directory file and a file of the same name within the directory. iykyk, don't try to make dirs happen.

🌈 OPTIONS 🌈

The following options are supported, periodt:

  • -c β€” produce a context diff with 3 lines of context. cute little context moment.
  • -C NUM β€” produce a context diff with NUM lines of context. you pick the number, bestie.
  • -e β€” Create a script for the ed editor. old-school editor representation.
  • -f β€” Like -e but in reverse order (output cannot be processed by ed). heads up: ed can't process this one.
  • -u β€” Output a unified diff with 3 lines of context. unified diff stans rise.
  • -U NUM β€” Output a unified diff with NUM lines of context. same vibe, your chosen NUM.
  • -q β€” Print a message if the input files differ instead of displaying the difference. just the tea, not the whole diff.
  • -s β€” Print a message if the input files are identical. By default no output is produced in this case. silence is the default when they match.

πŸ‘‘ AUTHOR πŸ‘‘

Mark-Jason Dominus, "<mjd-perl-diff@plover.com>". author icon behavior.

Visit my diff/LCS web page at <http://www.plover.com/~mjd/perl/diff/>. go look, bestie.


okay bye bestie 🫢 β€” this page is perl v5.42.2, dated 2026-02-15, and yeah it's DIFF(1) πŸ’–

πŸ“¦ where this page comes from