SDIFF(1)

๐Ÿ’– SDIFF ๐Ÿ’–

okay bestie, welcome to sdiff โ€” the User Commands girlie whose whole job is putting two files next to each other and being like "here's what's different, side by side." she's part of the diffutils squad. let's get into it ๐Ÿซถ


โœจ SYNOPSIS โœจ

sdiff [OPTION]... FILE1 FILE2

๐ŸŒธ DESCRIPTION ๐ŸŒธ

Side-by-side merge of differences between FILE1 and FILE2. that's it, that's the vibe โ€” two files, one column each, differences laid out so you can actually see them. iconic behavior tbh ๐Ÿ’…

mandatory arguments to long options are mandatory for short options too. no cap. if the long one needs a value, the short one needs it too.


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -o, --output=FILE โ€” operate interactively, sending output to FILE. like, it actually talks to you and writes the results over there.
  • -i, --ignore-case โ€” consider upper- and lower-case to be the same. A and a? same girl, different font ๐Ÿ’…
  • -E, --ignore-tab-expansion โ€” ignore changes due to tab expansion.
  • -Z, --ignore-trailing-space โ€” ignore white space at line end. trailing spaces are just โœจvibesโœจ, we're not counting them.
  • -b, --ignore-space-change โ€” ignore changes in the amount of white space.
  • -W, --ignore-all-space โ€” ignore all white space. every single one. gone. not me erasing your formatting ๐Ÿ˜ญ
  • -B, --ignore-blank-lines โ€” ignore changes whose lines are all blank.
  • -I, --ignore-matching-lines=RE โ€” ignore changes all whose lines match RE.
  • --strip-trailing-cr โ€” strip trailing carriage return on input. bye bye \r ๐Ÿฆ‹
  • -a, --text โ€” treat all files as text.
  • -w, --width=NUM โ€” output at most NUM (default 130) print columns. default is literally 130, remember that.
  • -l, --left-column โ€” output only the left column of common lines.
  • -s, --suppress-common-lines โ€” do not output common lines. if it's the same, we're not talking about it ๐Ÿซถ
  • -t, --expand-tabs โ€” expand tabs to spaces in output.
  • --tabsize=NUM โ€” tab stops at every NUM (default 8) print columns. yes bestie, default is 8.
  • -d, --minimal โ€” try hard to find a smaller set of changes. she's putting in the effort ๐Ÿ”ฅ
  • -H, --speed-large-files โ€” assume large files, many scattered small changes.
  • --diff-program=PROGRAM โ€” use PROGRAM to compare files.
  • --help โ€” display this help and exit. she's helpful and she's leaving ๐Ÿ’…
  • -v, --version โ€” output version information and exit.

โญ THE IMPORTANT LITTLE DEETS โญ

if a FILE is -, read standard input. yes, the humble dash. the main character of stdin ๐ŸŽ€

exit status is 0 if inputs are the same, 1 if different, 2 if trouble.

so like: 0 = twins, 1 = not twins, 2 = something went genuinely wrong ๐Ÿ˜ญ memorize it, it's giving exam question.

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Written by Thomas Lord. we love him, we thank him, periodt ๐Ÿ’œ


๐Ÿ› REPORTING BUGS ๐Ÿ›

Report bugs to: bug-diffutils@gnu.org

GNU diffutils home page: <https://www.gnu.org/software/diffutils/>

General help using GNU software: <https://www.gnu.org/gethelp/>

found a bug? don't suffer in silence bestie, email the diffutils girlies fr fr ๐Ÿ™ˆ

Copyright ยฉ 2025 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

okay so that last part is not a joke โ€” there is genuinely no warranty. it's giving "you're on your own" but make it legal ๐ŸŒˆ

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

The full documentation for sdiff is maintained as a Texinfo manual. If the info and sdiff programs are properly installed at your site, the command

info sdiff

should give you access to the complete manual. go read it, it's the director's cut ๐Ÿ’…


and that's the whole page bestie!! โœจ this was diffutils 3.12, dated April 2025 โ€” written by the Free Software Foundation, delivered to you with love, and honestly? she ate. mwah ๐Ÿ’‹๐Ÿฆ‹๐ŸŽ€