Pages

Tuesday, August 30, 2011

Comapre File Line By Line

 1. Check whether tool "diff" is installed in your system by typing "diff" in terminal.
    If the output is similar to the below one then diff tool is not installed in your system

   diff: missing operand after `diff'
   diff: Try `diff --help' for more information.

2. If the tool diff is not installed, install it using synaptic or terminal(sudo apt-get install diff)

3. Type the following command in the terminal

   diff filename1 filename2

  The above command will print the difference between the two files on the screen.
 You can also direct the output to another file using following command.

  diff filename1 filename2 >> filename3

  You can also ignore case of file contents using follwoing command

  diff -i --ignore-case filename1 filename2 >>filename3

4. For more options of diff
    Type(in terminal) :

    man diff




Fixing GPG Keys in UBUNTU


NOTE: Your hexadecimal numbers may be different then mine, so make sure to use the hexadecimals numbers in your error, not mine.

W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6D975C4791E7EE5E
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9BF3BB4E5E17B5

W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FB8BEE0A1F196A8
W: Failed to fetch http://ppa.launchpad.net/chromium-da...jaunty/Release
W: Some index files failed to download, they have been ignored, or old ones used instead.




The fix for this is to re-download the keys using the hexidecimal numbers given in the error .
Type this command into the terminal ("Applications > Accessories > Terminal" OR press "Ctrl-Alt-Del")
Code:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys

And then add the hexadecimal numbers to the command (again, these are my keys from my error. Make sure to use your own):

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6D975C4791E7EE5E 5A9BF3BB4E5E17B5 7FB8BEE0A1F196A8


The output should look like this:

"gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com"


NOTE: Your hexadecimal numbers may be different then mine, so make sure to use the hexadecimals numbers in your error, not mine.











http://ubuntuforums.org/showthread.php?t=1221323