FreeBSD Manual Pages
fcomp(1) General Commands Manual fcomp(1) NAME fcomp - file compare SYNOPSIS fcomp [ option... ] filename1 filename2 fcomp -Help fcomp -VERSion DESCRIPTION The fcomp program is used to compare text files, similar to the diff(1) program. Its advantage is that it always produces minimal differences, and so will never mis-sync when comparing files. Its disadvantage is that it runs slower due to the extra work required to produce optimal differences. However, for files differing by less than a few thousand lines, its performance is adequate. The algorithms used by this util- ity are also used by the fhist(1) program in order to produce the edit history. To compare file old to file new, the command: fcomp old new would be used. This gives the differences involved in converting from file old to file new. This is analogous to the use of the cp(1) com- mand. Either the old or new file may be a directory, in which case the comparison is done to the file in the directory with the same name as the other file. An error is given if old and new are both directories. OPTIONS The following options are understood: -BINary This option may be used to compare binary files on a byte-for- byte basis. (Each byte is treated as a "line" by the algo- rithm.) Byte values are displayed in hexadecimal, as are the addresses. Note: this is different behaviour to the fhist(1) option of the same name. -No_BINary This option may be used to avoid comparing binary files. A warnign will be prointed on the standard error, but the program will report success without printing andy other output. -Blank Ignore blank lines in the input files. -Context number This specifies the number of lines of "context" which is dis- played. This shows the specified number of lines before and after the actual lines being changed. This is useful to locate and identify the line which is actually being changed, when there are many identical copies of the line in the file. -Edit Output an edit script which is machine readable. -Failures number This stops the comparison if the number of changes exceeds the specified number. Each change is a delete or insert of a sin- gle line. This is useful when you are not interested in the results when the files are totally different. Another use is a quick check to see if two files are identical, by using a value of zero. -Join number This merges together lines which have changed, if they are sep- arated by up to the specified number of unchanged lines. This makes a change look bigger, but reduces the "choppiness" of the output by showing fewer regions being changed. This is partic- ularly effective to suppress worthless matchings of single blank lines or comment beginning and ending lines. A useful value for this option is 3 or so. -Matching Output matching lines, rather then changed lines. -Number This outputs the line numbers at the left edge of the output. This isn't normally needed, since the line numbers are dis- played in the comment line preceding the lines being displayed. Not outputting the line numbers prevents the terminal from needlessly scrolling for long lines. -Output filename Send the output to this file, rather than the standard output. -Quiet Output only a quick summary of changes needed. -Spaces This option ignores differences in the number of spaces in the two lines. That is, two or more adjacent spaces are handled as a single space. Spaces at the beginning or end of a line are totally ignored. -Upcase Uppercase lines before comparing. -What This outputs all of both files together, showing what happened to each line of the first file in order to change to the line in the second file. This output is in "change bar" format, where inserted lines begin with |+, deleted lines begin with |-, and unchanged lines begin with spaces. The presence of the vertical bar makes it easy to search for the changed lines. Reference Manual FHist fcomp(1)
NAME | SYNOPSIS | DESCRIPTION | OPTIONS
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=fcomp&sektion=1&manpath=FreeBSD+Ports+15.0>
