Archive for March, 2009
How to access files in Linux partitions from Microsoft Windows
Mar 19th
Microsoft Windows doesn’t recognize Linux partitions and doesn’t provide any file system drivers for accessing Linux partitions with EXT2/EXT3 file systems. However there are some open source tools which can be used for this purpose.
Explore2fsThe best and safest way to access files in Linux (EXT2) partitions in Microsoft Windows operating system is to use Explore2fs software. This tool works much like Windows Explorer and pretty easy to use. This provides you read-only access to all Linux partitions present on all hard drives in your system. On the left pane it shows you the recognized Linux partitions along with directory structure More >
How to create a patch file in Linux using diff command
Mar 13th
Patch files describe the differences between two versions of same project and it is the favourite way of exchanging differences among developers. Patch files come in handy when the project is huge and exchanging whole source code is not so convenient. If you observe the download section of open source projects like Linux kernel, you will find patches for other versions based on a base version. That means if I had already downloaded sources of 2.6.0 version kernel sources and if I want 2.6.1 sources, I would rather download the patch file instead of downloading whole 2.6.1 source code.
Any Linux More >
How to kill a process in Unix/Linux
Mar 4th
There are multiple commands supported in UNIX/Linux to kill a process. The most-used command is “kill” command which expects PID of the process which can be retrieved from the output of “ps” command.
To kill a process named httpd, first search for the process in the output of “ps” command and use the PID to kill it.
[neo@techpulp ~]# ps -e | grep kcalc 3482 ? 00:00:00 kcalc [neo@techpulp ~]# kill 3482 [neo@techpulp ~]# ps -e | grep kcalc [neo@techpulp ~]#
If the process is not killed using the above command and if you want to terminate the process for sure, you can use “kill -9″ which More >
How to use “diff” utility effectively
Mar 4th
The command line tool “diff” helps you find differences between two files or directories. It also can report the differences between two directories including all files and sub directories recursively.
Compute differences between two files:
[neo@techpulp ~]# diff animals1.txt animals2.txt 4a5 > crane 8,9d8 < tiger < panda 16c15 < lion --- > lion roars [neo@techpulp ~]#
Whatever starts with “<” is the change in first file and whatever starts with “>” is the change in second file.
Compute differences between two files but ignore white spaces and blank lines:
[neo@techpulp ~]# diff -b -B animals1.txt animals2.txt
Compute differences between two directories:
[neo@techpulp ~]# diff dir1 dir2
Compute More >
How to find if two binary files differ or not
Mar 4th
The standard “diff” command can be used to find if two binary files differ from each other or not. The following example shows how to do it.
[neo@techpulp ~]# diff file1.bin file2.bin Binary files file1.bin and file2.bin differ [neo@techpulp ~]#
Another way to find that out is to compute MD5 digest on both files and see if they match. MD5 is an cryptographic algorithm which computes an unique digest for each file. The both files are same if the MD5 digests of both files match and otherwise they differ. The “md5sum” command can be used to compute MD5 digest.
[neo@techpulp ~]# md5sum file1.bin file2.bin 4714b62a51a4057fa73a1ded36b75143 More >
How to force a HTML link to open in a new TAB
Mar 4th
Typically it is good to open a link which takes the user out of current website in a new window or a new TAB so that the user doesn’t leave the original site.
The link target can be specified as “_blank” to force the link to open in a new TAB. The following example shows how to do it.
<a href="http://www.popularmatrimony.com" target="_blank">PopularMatrimony</a>
The following example link shows how it works. PopularMatrimony
Where is kedit editor in KDE of Fedora 10
Mar 4th
In Fedora 10, the standard KDE text editor kedit is not present. The default text editor in KDE is kwrite instead of kedit. To open kwrite you can go to “Fedora Menu > Applications > Utilities > Text Editor (kwrite)”.
Alternately you can press Alt+F2 which opens run dialog in which you can type kwrite and press Enter key.
Alternately you open Fedora Start Menu and type kwrite in the search box.
Otherwise you like tabbed editors, you can use gedit which is GNOME desktop based text editor.
How to close a non-reponsive window in KDE
Mar 4th
Some times applications become non-responsive due to defects in its software. KDE makes it easy to close them using the standard close button present at the top right corner of the window.
Just press the X button at the top right corner as you close any other application. If the application is responsive it will be closed normally. Otherwise KDE waits for a definite time for the application to close when the X button is clicked. If the window doesn’t close with in that time, KDE will show you a dialog prompt that will let you terminate the application forcibly.
There is More >
Creating alias commands in Bash to make life easier
Mar 1st
If you have longer command or a set of commands that needs to be run repeatedly and you are tired of typing full command or using history to run them, then alias commands are designed for you. Using history to run set of commands is not so comfortable.
You can define your own command using aliases based on existing commands. For example, you want to mimic Microsoft Windows command line in UNIX or Linux, you define an alias for windows command with the equivalent command in UNIX or Linux. Look at the following example in which a “dir” command is defined More >


Recent Comments