Neo
This user hasn't shared any biographical information
Posts by Neo
How to enable auto login for SSH
Apr 23rd
This article assumes that the host name of server is “server1.techpulp.com” and that of client machine is “client1.techpulp.com“. You can replace these with your own domain names or IP addresses to suit your needs.
Login to the server system to which you would like password-less login.
[neo@client1 ~]$ ssh neo@server1.techpulp.com neo@server1.techpulp.com's password: [neo@server1 ~]$
Generate a RSA key pair in the server as shown below. Just press ENTER key when it prompts for passphrase. The following example may be exactly as shown below and may vary based on the version of ssh-keygen present in your server system. But it prompts you for same input More >
How to safely remove a file that contains sensitive data in Linux
Apr 16th
Typically a file removal operation, in Linux or any other operating system, doesn’t actually erase all contents of the file. Though the file is logically deleted and doesn’t appear to the be present, its contents still present in the hard drive. Any raw disk reading software or a data recovery tools can detect such contents to gain access to sensitive information such as passwords, credit card numbers etc.
Let us assume that you have stored your passwords and credit card numbers in a plain text file, even once temporarily. It is always wise to overwrite the file contents many a times More >
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 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 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 >
Bash script to replace a word or a string in multiple files at once
Feb 21st
There are multiple ways of replacing a word or a string with another in a stream of input. Here, in this article, we use “sed” command. While the “sed” command operates on one file at a time, the bash script takes care of iterating it through multiple files and making backups of original files. Run the following script with no arguments to view help.
#!/bin/bash
usage() {
echo Usage: $0 str-from str-to files
echo e.g: $0 "this string" "that ring" file1.txt file2.txt file3.txt
exit 1
}
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" More > Bash script to delete blank lines from a file
Feb 14th
There are multiple ways of deleting blank lines from a file. This article tells how to use “grep” command to achieve the objective. The “grep” command provides an option “-v” to invert the matching. That means grep finds the lines that are not matching the pattern specified. The matching pattern is a simple regular expression to match all blank lines i.e “^$“. The “^” character means beginning of a line and “$” means end of a line. The pattern matches all blank lines as there are no characters between “^” and “$” characters.
Here is the sample file “sample.txt” that contains More >


Recent Comments