Thursday 23 February 2017

Comparing two files using Kompare on Ubuntu

Comparing two files using Kompare on Ubuntu

On ubuntu you can compare two identical files using program called 'kompare', let say you have two config files with same name and structure, you have no idea what are the differences between the two.

You will need a program that can compare two different files, you can use a command line tool called 'diff', but for more convenient we need to use graphical program, therefore we need 'kompare'.

'Kompare' is a GUI program for showing differences between two files, 'kompare' can highlight the differences between two files, so it's much easier to read for us.

You can install 'kompare' on ubuntu like this:
sudo apt-get install kompare
Let's do a little test

  • create config.json file with this content :
  • {
    "mode" : "race",
    "type" : "red",
    "status" : "active",
    "flag" : "true"
    }
  • copy the config.json into new file called config2.json
  • cp config.json config2.json
  • edit content of config2.json like this:
  • {
    "mode" : "race",
    "type" : "red",
    "status" : "active",
    "flag" : "true",
    "number" : "2"
    }
  • use 'kompare' to compare the two files and see what happen


Comparing two files using Kompare on Ubuntu

Comparing two files using Kompare on Ubuntu

Harry

Author & Editor

A technology enthusiast and addictive blogger who likes to hacking tricks and wish to be the best White Hacket Hacker of the World.

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.