Pages

Thursday, November 28, 2013

Ads not by this site: How to remove

This has been very popular way to advertisement for this when you install any software using down loader after successfully installation DefaultTab.exe  gets downloaded and installed. you do not need to do anything even "next click". so people are unware of this installation when it gets installed on your system. you come to know only when you see advertisement on top and bottom of any site (tagged with "ads not by this site").
so to get rid of these..uninstall these plugin or software..
1>DefaultTab.exe
2>DownloadKuppe

and enjoy.

Monday, July 29, 2013

How to find k th row from bottom in a table in SQL

Refer table click here for this post. Table name is emp, to display kth row from bottom
we need to run the following command

select ename,sal from emp e1 where (select count(*) from emp e2 where e1.rowid <= e2.rowid)=4;

the inner query finds the row which has 4 rows below it using rowid keyword in sql.

How to display first k rows in SQL

To display first k rows from a table make use of rownum keyword which initially has value 0 and gets incremented by one when it moves to next row.

Here is the example to display first three rows from emp table.

select *from emp where rownum < 4




Sunday, July 28, 2013

Find maximum salary in each department


we will use the table displayed below for further post unless and otherwise mentioned. table emp contains five column eno(employee number),ename(employee name),sal(employee salary),deptno(employee's department number),mgr(employee's manager number).




the below query displays name of each employee,salary and deptno who are having maximum salary in their department.

Granting and retrieving privileges in oracle

if we want to assign some privilege to some user say "sonu" then we can assign privilege using command GRANT

grant privilege_name on table_name to user_name;
if there are multiple privileges then seperate using commas.
in the figure it's assigning all privileges to user "sonu"



 similarly we can retrieve privilege using revoke command which is shown in the below figure.


Thursday, June 27, 2013

how to recover grub



To recover grub boot loader install Easy bcd you can download it from cnet

1. Once you have installed easy bcd open it

2.Go to option add new entry in left pan

3. Now click on tab linux /BSD

4. Select grub2 (which is latest grub boot loader) from type

5. Type any name say "my linux" which you want to display in menu

6. Click on Add entry, you will see message flashing in left bottom corner "my linux has been added successfully"

Now restart your system and enjoy.

> do suggest/comment

Tuesday, June 11, 2013

why should i hire you

    This is very famous HR interview question and idea behind asking this question is that they want to know your strengths. it's indirect way to ask your strength like "what are your strength". so you should tell your strengths like i am good at this and that (your technical strengths like any subjects,communication skills, fast learner etc.).


    so finally you need to tell your strengths but do not say that i am the best and you should hire me and yes do not mention so many  strengths even if you have.only tell few of them at which you are strong.
   
   

Sunday, June 9, 2013

How to install .tar.gz in ubuntu

For example you want to install vlc.tar.gz file in ubuntu then first you need to extract this .tar.gz file using the following command

$ tar -xvzf vlc.tar.gz

one folder will be created with name vlc, go to this folder  and now run these commands

$./configure
$make
$make install

if any dependency error message is shown then resolve that dependency and then run
$make
$make install


Sunday, June 2, 2013

What is LPR command in linux

lpr command is used to give file for printing to the destined printer.
there are few options for lpr command

-P prints file to the named printer or give address of printer

-# sets number of copies to be printed between 1 to 100

for example
lpr -P addressofprinter -# 4 filename1 filename2

you can print multiple files at a time. number after -# is number of copies to be printed.

Saturday, May 18, 2013

What is grep command: linux

   grep command is used to search a particular pattern in the given input.
for example in snap shot.
first we display content using cat just to check file content

$cat  filename

then give any word which you want to search

$grep "string-name" filename

this displays the entire line in which this string-name appears
if you want to search case insensitve word then just put option -i

$grep -i "string-name" filename

if some word is not found in file then it displays nothing

for  more details about grep you can go to manual page entry by running

$man grep




Sunday, March 3, 2013

I Accidentally Removed "/usr/sbin" : How to recover it in Linux

whenever you run rm command be carefull.first run ls and see what are the files and folders going to be deleted.then only run rm.rm * deletes all the contents in current directory.which may destroy your system.

some possibilities to recover deleted directory /usr/bin :it contains all system binary files.

1> go to rescue mode and try to restore. or upgrade using CD/DVD.
or
2>try copying the same directory /usr/sbin from some other operating system(prefer the same Operating System and (if possible)same version )

to copy the directory
1> go to terminal during system boot
2>run su
3>run cp xyz /usr/
where xyz is path for the directory sbin

Thursday, February 28, 2013

How to Count no. of files/directory in a directory


Steps are mentioned in snapshot , To count no of files/directory in a directory
> go to directory (here DistSys) in which you have to find no. of files and folders
>now run ls command and pipe it's output to command " wc -l "

cd DistSys
then
ls | wc -l

which gives a number say 11 ,which means directory DistSys contains 11 files or folders.


Thursday, February 21, 2013

How to create your own command in linux


If you want to add your own command in linux operating system then

write any script.for example i want to add command which displays present

working directory with list of files or folders under it.then type following in gedit or any editor

#!/bin/bash

echo "present directory is `pwd` "

echo "files are `ls` "

save it with any name say pwdfiles

now make it executable

chmod +x pwdfiles

now copy it to /usr/bin directory.

cp pwdfiles /usr/bin/



Sunday, February 17, 2013

How to set Default Boot Option to Windows OS or Vista


To set Default Boot option to any operating system say xyz you need to edit grub.cfg file
which resides under /boot/grub directory.
boot screen will look like this...


and each options are numbered from 0 to n( 7 here )

Ubuntu,with linux 2.6.35-23-generic =0
Ubuntu,with linux 2.6.35-23-generic(recovery mode)=1
Ubuntu,with linux 2.6.35-22-generic =2
Ubuntu,with linux 2.6.35-22-generic(recovery mode)=3
Memory test (memtest86+) =4
Memory test(memtest86+,serial console 115200) =5
Windows Vista (loader) (on /dev/sda1) =6
Windows Vista (loader) (on /dev/sda2) =7

now in grub.cfg file set default="7" to keep default boot windows vista
and to keep ubuntu as default boot
set default="0"

Wednesday, February 13, 2013

Installation Error, “Unable to lock the administration directory”


Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
this error occurs during installation of software when lock file is being modified
by some other process or when you are trying to install two different software at
the same time so get rid of this problem
1>install one software at a time

but the problem still persist then

run the following command

rm /var/lib/dpkg/lock


this command removes lock over lock file.location of the file may be different in
different linux operating system

How to install packages in ubuntu


Before you install any package in ubuntu you need to run three commands
1> sudo dpkg --configure -a
2> sudo apt-get update
3> sudo apt-get upgrade
you have to execute these commands in sequence.after executing these commands
go to synaptic software center in ubuntu and select any package which you want to install.

How to set path in ubuntu

To set path for new program you just need to edit .profile or .bash_profile file
which is present in /etc . for example if you want to set path for program xyz
which is present in /usr then export PATH=":/usr/xyz"

don't forget to put ":" before /usr/xyz otherwise it will overwrite the path variable
and path variable will no longer have it's original values.

Monday, February 11, 2013

Could not connect to session bus




"could not connect to session bus: //bin/dbus-launch terminated abnormally without any error message"


if you get error message like this on ubuntu it means value of PATH variable has changed and hence it's not able to run /usr/bin/dbus-launch . On the login screen Press CTRL+ALT+F1, then type in your regular name and password. and run export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" now restart system and then after login set path variable .profile file.

Sunday, February 10, 2013

SU:Authentication Failure

            when you install ubuntu and run su command first time it will show the message authentication failure.so you need to set super user password by running the following command.
$ sudo passwd
then it will ask for new password and then confirm password.
after this u can run su command.

Infibeam.com