UDIFF(1)
π
UDIFF(1) β the udiff / fdiff / fsdiff glow-up π
okay so bestie, welcome to the Schily's USER COMMANDS corner of the manual-verse β¨ this little trio of programs is literally here to show you where two files differ, and honestly? it's giving main character energy. π¦
πΈ NAME πΈ
udiff, fdiff, fsdiff β shows where two files differ π«Ά
β SYNOPSIS β
udiff [ options ] file1 file2
fdiff [ options ] file1 file2
fsdiff [ options ] file1 file2
π DESCRIPTION π
So udiff shows you what lines differ between two files, periodt. π
It supports arbitrary line lengths (yes, even the chaotic ones) and it treats binary files the same as text files β no cap.
Here's the tea though: it does not support many options or features, and there is no best match resync mechanism. BUT β and this is the iconic part β the output is typically identical to the output from the classical UNIX diff(1). slay. π₯
If you call it as fdiff or fsdiff, the POSIX output style is used and the nmatch=# resync default value is set to 1 line. iykyk.
If you call it as fsdiff, the exit code is compatible to bdiff(1) and differences in the files still result in a zero exit code; only an error causes a non-zero exit code. This allows fsdiff to be used as a replacement for the bdiff program for SCCS. π
Since the performance of udiff is only a linear function of the file size, using fsdiff speeds up SCCS with large files. literally efficiency queen. π
Since the differences reported by fsdiff are smaller that what bdiff reports, this helps to keep SCCS history files smaller. (yes we stan a compact history file π)
π the normal output (when you call it as udiff) π
The normal output if called as udiff contains lines of these forms:
-------- 1 line deleted at %ld:
-------- %ld lines deleted at %ld:
-------- 1 line added at %ld:
-------- %ld lines added at %ld:
-------- 1 line changed at %ld from:
-------- %ld lines changed at %ld-%ld from:
-------- 1 line changed to %ld lines at %ld from:
-------- %ld lines changed to 1 line at %ld-%ld from:
-------- %ld lines changed to %ld lines at %ld-%ld from:
-------- to:
followed by blocks with the changed text. This is easier to read by humans than the POSIX output variant. fr fr, it's so much friendlier π
π the POSIX output variant π
The POSIX output variant contains lines of these forms:
n1 a n3,n4
n1,n2 d n3
n1,n2 c n3,n4
where n1 and n2 represent lines file1 and n3 and n4 represent lines in file2. These lines resemble ed(1) commands to convert file1 to file2. By exchanging a for d and reading backward, file2 can be converted to file1. As in ed, identical pairs, where n1=n2 or n3=n4, are abbreviated as a single number. π§
Following each of these lines come all the lines that are affected in the first file flagged by <, then all the lines that are affected in the second file flagged by >. cute little arrows, love that for them β
β¨ OPTIONS β¨
-helpβ Prints a short summary of theudiffoptions and exists. (yes, "exists" β that's literally what the page says, we're not fixing it π)-versionβ Prints theudiffversion number string and exists.nmatch=#β Sets the number of matching lines to resync. Ifudiffis called asudiff, the default is two lines, otherwise it is one line.-posixβ Output the differences in POSIX style instead of usingudiffstyle.
π EXIT STATUS π
The following exit values are returned:
0β No differences were found (udiffandfdiffonly).0β No error occurred (fsdiffonly).1β Differences were found (udiffandfdiffonly).otherβ An error occurred.
okay yes there are two different 0s and that's not a typo, it's just how the three personalities work π read the parentheticals bestie, they matter!!
π¦ NOTES π¦
No output is generated if the files are the same. silence is golden, and also correct πΈ
π BUGS π
None currently known. (iconic behaviour honestly, no notes π)
Mail bugs and suggestions to schilytools@mlists.in-berlin.de or open a ticket at https://codeberg.org/schilytools/schilytools/issues.
The mailing list archive may be found at:
https://mlists.in-berlin.de/mailman/listinfo/schilytools-mlists.in-berlin.de.
π AUTHOR π
udiff was written 1985 - 2020 by Joerg Schilling and is now maintained by the schilytools project authors. 1985 to 2020?? the longevity, the commitment, we love to see it π«Ά
π₯ SOURCE DOWNLOAD π₯
The source code for udiff is included in the schilytools project and may be retrieved from the schilytools project at Codeberg at
https://codeberg.org/schilytools/schilytools.
The download directory is
https://codeberg.org/schilytools/schilytools/releases.
and that's the whole page bestie!! mwah π this little gem is brought to you by Joerg Schilling, dated 2022/08/21, and it lives under the UDIFF(1) name in the manual β go diff something gorgeous today ππ
π¦ where this page comes from
- opensuse-leap 16.0: sccs 2022.10.16-160000.2.2 Β· CDDL-1.0
- opensuse-leap 16.0: sccs 2022.10.16-160000.2.2 Β· CDDL-1.0
- opensuse-leap 16.0: sccs 2022.10.16-160000.2.2 Β· CDDL-1.0
- opensuse-leap 16.0: sccs 2022.10.16-160000.2.2 Β· CDDL-1.0
- Copyright 1985-2020 J. Schilling
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms