Archive for the ‘Mix’ Category

understanding ‘diff’ command

November 6, 2008

diff sample.old sample.new
5c5
< you agree to the terms

> you agree to the terms and conditions
7d6
< Six ounces chopped liver
21a22
> Note: The previous version of this recipe had a few errors!

The output is actually a description of how to transform the old file into the new one. Here, diff is telling you three things:

~ The 5c5 message says to replace line 5 of the old file with line 5 of the new file. Both the old and new text are displayed, separated by a line of three dashes. (The less-than (<) notation means “remove this line,” and the greater-than (>) sign means “add this line.”)

~ The 7d6 message says to delete line 7 from the old file, and the files will then be in sync, starting at line 6 of the new file. The text to be deleted is displayed on the next line.

~ The 21a22 message says to add a new line after line 21 of the old file. The text to be added is displayed on the final line of the output.

fixing issue with firefox3.0b5

October 9, 2008

Ubuntu Hardy 8.04 most things went well but today is the day I finally was able to use firefox 3 without constant crashes. The crashes were more like stalls and when starting from console there were no helpful messages displayed and it locked up in a way that the built in crash reporter never even displayed.

So, I just download the latest version 3.0.3 from mozilla’s site and then follow the steps below-

cp -R ~/.mozilla ~/.mozilla.backup
sudo tar -jxvf firefox-3*.tar.bz2 -C /opt
rm firefox-3*.tar.bz2
sudo mv /opt/firefox/plugins /opt/firefox/plugins.backup
sudo ln -s /usr/lib/firefox/plugins /opt/firefox/plugins
sudo dpkg-divert –divert /usr/bin/firefox.ubuntu –rename /usr/bin/firefox
sudo ln -s /opt/firefox/firefox /usr/bin/firefox

Assigning a user to a group

May 21, 2008

Sometimes a user need to be assign to a existing group or to a new group.If the group is exists then just follow the command and if the group is a new one then first create the group using groupadd command and then follow the command.

usermod -a -G <group-name-2b-add> <user>

where,
g – primary group
G – upplementary group
a – option will add the user to a group without removing him/her from other groups.

Installing missing java plugin for firefox in linux

May 20, 2008

Sometime firefox cann’t automatically install the missing java plugins.In that case u have to do manual installation.

First download the missing installer something like jre-6u3-linux-i586.bin file.Then run it as follows

./ jre-6u3-linux-i586.bin

Now open a new tab in your firefox and there type

about:config

and in Filter tab type    java

Then check for following options are valid or not.

java.default_java_location_others /usr/local/jdk

java.java_plugin_library_name libjavaplugin_oji.so

And finally make a soft link as follows

ln -s /usr/local/jdk/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/iceweasel/plugins/libjavaplugin_oji.so

thats it!Now restart your firefox.

Converting .pdf to .doc in Linux

May 20, 2008

In windows if you want to convert a pdf file to text file you need to install a extra software(you will find it quite easily by google search).Moreover you will get a trial version or may be a pirated one of these kind of software.

But in linux you will find the most easiest way to complete the job.Adobe Reader(version 7/8) for linux provide this facilitiy for you. You will find both these version in our korell host.No need to download. Don waste bandwidth. -) .Just follow this way….

Open a pdf file using Adobe reader.Then click file menu and you will find a option “Save as text”. Just specify the doc file name and save path.Thats it!!!