Author Archives: nandal

WEB CRAWLER USING JAVA

Hi, today we’ll use java to create a simple web crawler which can be used to fetch webpages recursively untill it fetches 1000, this limit can be changed as per our need. This code fetches only the url links out the fetched pages. It can be customized to fetch other resources according to our need. Eg. Images or mp3 etc. Continue reading

Code to Count no of Words in a File

Hi pals,
Yesterday, I had a telephonic interview and the interviewer asked to create this program. Hope it might be helpful for you. He left the decision of choosing the programming to chose on me. The interviewer was a Window User and I prefer GNU/Linux. Therefore, I decided to code in Java. Because the program compiled in java is machine independent. It only requires Java Runtime Environment to run on the target platform.
Now let’s look at the code. Continue reading

Shell Script to copy files in a folder

A shell script to find all the files in the given path recursively and then copying them in the target folder

#!/bin/sh 
#################################################################
# A shell script to go through a directory recursively and copy #
# all the files in the given folder by sandeep nandal 2012      #
#################################################################
 Continue reading 

open any file from terminal in linux

All window users know how to open a file with it’s default application, by simply double click on the file icon. Same can be done if linux is used in X Window Graphical User Interface. Eg. double click any .mp3 file to play the .mp3 in the default music player or double click any .pdf file in default pdf viewer. Now here we list how to open these files through (command line) terminal with their default applications.These commands work same as if you double click the file in GUI. Continue reading