Kompare
Encyclopedia
Kompare is a free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 graphical computer application
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

 which helps the user
User (computing)
A user is an agent, either a human agent or software agent, who uses a computer or network service. A user often has a user account and is identified by a username , screen name , nickname , or handle, which is derived from the identical Citizen's Band radio term.Users are...

 to compare two different text file
Text file
A text file is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists within a computer file system...

s or two directories
Directory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...

. It is part of the KDE SC desktop environment
Desktop environment
In graphical computing, a desktop environment commonly refers to a style of graphical user interface derived from the desktop metaphor that is seen on most modern personal computers. These GUIs help the user in easily accessing, configuring, and modifying many important and frequently accessed...

 and therefore primarily used on Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and other Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

-like operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s. Kompare does not actually compute the differences between the compared files itself, but is merely a graphical front end to the command line interface diff
Diff
In computing, diff is a file comparison utility that outputs the differences between two files. It is typically used to show the changes between one version of a file and a former version of the same file. Diff displays the changes made per line for text files. Modern implementations also...

 utility.

It is a standard KDE SC tool, it comes packaged with the kdesdk
Kdesdk
Kdesdk is a KDE software package to work with software development.- List of component :* Cervisia - CVS Frontend* KAppTemplate - KDE Template Generator* Kate - Advanced Text editor for programmers* KBugBuster - KDE Bug Management...

 module.

Kompare was previously known as "kdiff".

Comparing text files

As the above image shows, Kompare displays the two compared files next to each other in a way that corresponding lines are always positioned as near to each other as possible, independent of the position of the scrollbar
Scrollbar
A scrollbar is an object in a graphical user interface with which continuous text, pictures or anything else can be scrolled including time in video applications, i.e., viewed even if it does not fit into the space in a computer display, window, or viewport...

. Lines that are different in the compared files are highlighted in both file views. Three different colors are used for highlighting, indicating whether the highlighted passage either
  • exists in the first file but not in the second one (i.e. the highlighted passage has been deleted from the first file); or
  • exists in the second file but not in the first one (i.e. it has been added to the first file); or
  • exists in both files but is different (i.e. it has been changed since the first file had been created)

Other features of Kompare

An incomplete list of features Kompare supports additionally to comparing text files follows.

Comparing directories

When two directories
Directory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...

 are chosen to be compared instead of two text files, Kompare displays a directory tree
Tree view
A tree view or an outline view is a graphical user interface element that presents a hierarchical view of information. Each item can have a number of subitems...

 for both selected directories, which contains only pairs of corresponding files and directories that are not equal in the two compared directories. Clicking on an entry displays a comparison of the two selected files.

Creating and applying patches

Kompare is able to create a patch
Patch (computing)
A patch is a piece of software designed to fix problems with, or update a computer program or its supporting data. This includes fixing security vulnerabilities and other bugs, and improving the usability or performance...

 file which lists only the differences between two compared text files A and B. Further, Kompare can apply a patch file which was created this way to an original file A and, in this manner, recompute the contents of the corresponding file B. This is a comfortable utility for passing a corrected version of a file to a friend who already has an older version of the same file, because only the (relatively small) patch file has to be delivered and the receiver can generate the corrected file by applying the patch to the original file.

The patches created and applied by Kompare are compatible
Software incompatibility
Software incompatibility is a characteristic of software components or systems which cannot operate satisfactorily together on the same computer, or on different computers linked by a computer network. They may be components or systems which are intended to operate cooperatively or independently...

 with patch files generated or applied by the command line interface diff utility, because Kompare is in fact merely a graphical front end to diff and the patches are created and applied by patch
Patch (Unix)
patch is a Unix program that updates text files according to instructions contained in a separate file, called a patch file. The patch file is a text file that consists of a list of differences and is produced by running the related diff program with the original and updated file as arguments...

, which gets called by Kompare.

See also

  • Comparison of file comparison tools
    Comparison of file comparison tools
    -General:Basic general information about file comparison software.-Compare Features:-API / Editor Features:-Other features:Some other features which did not fit in previous table-Aspects:What aspects can be / are compared?...

  • meld
    Meld (software)
    Meld is a free computer program for Linux and other Unix-like platforms, for viewing and merging differences between files in a graphical environment. It allows users to view a diff of two or three files visually, color coding the different lines...

    , KDiff3 - visualize differences very much like Kompare, but also allow merging files and editing details of the text.
  • FileMerge presents file differences using a style very similar to Kompare.
  • WinMerge
    WinMerge
    WinMerge is a free software tool for file comparison and merging text-like files. It is useful for determining what has changed between versions, and then merging changes between versions.The project is currently dormant.WinMerge runs on Microsoft Windows....

    , a similar free software tool for Microsoft Windows.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK