Monday, January 11, 2010

Linux stuffs................

1. To create a file using cat command
cat >> filename
and after the contents are written press ctrl-d

2.grep command

grep -e pattern filename
this command looks for particular pattern remind u that it doesnt matches the word or line and prints out the filename:the line in which the pattern was found

grep -iwh pattern *

this command looks for particular word prints out the the line in which the pattern was found

here in this command it searche for all the files in the directory and
w: for matching the whole word
 i: it doesnt take into account the case of the letters
 h:it doesnt prints out the filename

grep -cv pattern *
this counts total no. of lines not containg the particular pattern
c:it counts the total no. of lines
v:except the pattern

grep -x pattern *
this matches the whole line for the pattern and then prints the filename:pattern
x:for the whole line the pattern is searched

3.sudo lshw -html > raj.html
this list the hardware information of your computer in html format

Wednesday, March 18, 2009


some of the path to be set after u run the ./install script




Sunday, August 31, 2008

ubuntu grub recovery

this is some technical stuff here.....
for the ubuntu users whose ubuntu has been wiped out after installing windows doesnt need to worry u only need ubuntu live cd to get back your grub....
1.boot your system using live cd....
2.when u get to the desktop just enter into the terminal...i hope u know terminal hey just kiddin shell type in

sudo grub

and something like this appear in the shell

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]



grub>find /boot/grub/stage1

youll get somethin like this

hd(?,?) //where ? represents a number

grub>root (hd?,?)

//take care of space between root (hd?,?)
grub>setup (hd0)



re reboot the system ull get ur ubuntu back

sudo grub gets you the grub shell.
find /boot/grub/stage1 has grub locate the file stage1. this tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.

Thursday, August 28, 2008

indian way of commonwealth game

is beijing olympic a boon or bane for indian commonwealth game.... a question yet to be answered whom?? government,individuals....sorry no one is willing to answer...full stop.
yeah the standards set by china were simply unsurpassing and reaching anywhere nearby will take loads of effort for india...
still myriad problems are there in capital itself....metro still not functioning fully in capital city itself...roads with uncountable potholes making it a nightmare for commuters...airports not able to handle present traffic then how could it handle thousands of tourist visiting during the games.....who will accommodate these many'll say hotels but are there enough? stadium not yet erected ...still we could see cowdung on the tracks..what do we want to see... mr usain bolt running on those dilapidated tracks...yeah the most important one the power problem in the city... it sometimes amuses me to hear city of one of the powerful nation having electricity problem...what will happen if there will be power failure during the inauguration ceremony ....who will take care of all this...
government..yeah this government who is already surmounted by uncountable problem from kashmir to north-east has it got enough time to think regarding all this problem...mind you for china it took nearly eight good years to make all the arrangement can india do it in 2 years....lets see...wont it be a better idea for indian government to shift the venue to other place instead of ruining india 's image....