Friday, September 16, 2011

Some useful commands in linux





ls -F


The -F option is to display a slash after each working directory and an asterix after each executable file


 to create a directory under a directory in one command


mkdir -p


for example


 mkdir -p sourav/sourav2/sourav3 


cd when using without arguement takes you to the home of current working directory


for example


pwd


/home/sourav


mkdir sourav3


cd sourav3


pwd


/home/sourav/sourav3


cd


pwd


/home/sourav


copy a file using relative pathname


pwd 


/home/sourav


mkdir -p sourav3/sourav4


cd sourav3


cat > sourav1.txt


Hello how are you


ctrl+z


cp sourav1.txt ..


ls ..


sourav1.txt will be shown in the home direc


cd ~


cat > sourav2.txt


Hello how are you


ctrl+z


cp sourav2.txt sourav3/sourav4


ls sourav3/sourav4


sourav2.txt will be shown
cp sourav2.txt


to add a new user


$ sudo useradd username -m -s /bin/bash 
$ sudo passwd username 


to login as a different user in terminal


sudo -i -u





Sunday, September 11, 2011

Solving missing gnome-panel in ubuntu

Just two commands are  needed


pkill gnome-panel


gnome-panel

Upgrading the kernel in Ubuntu


Upgrade of the kernel in Debian or Ubuntu Linux


Use apt-get command. First find your kernel version:
 uname -r


Next find available kernel images:


 apt-cache search linux-image


Now install kernel by explicitly specifying version number:
 apt-get install linux-image-x.x.x-xx


OR


 sudo apt-get install linux-image-x.x.x-xx


Search for kernel  header version (must to use in Vmware)


 apt-cache search linux-headers-$(uname -r)
Install linux-header package


 sudo apt-get install linux-headers-$(uname -r)


Let's now configure all packages that are still unconfigured :
 sudo dpkg --configure -a

First things to do after installing Fedora

i
yum -y update kernel

yum -y install kernel-devel kernel-headers dkms gcc gcc-c++

To enable root login in gui

    su -c gedit /etc/pam.d/gdm

Comment the following line  'auth required pam_succeed_if.so user !=root quiet'

    # auth required pam_succeed_if.so user != root quiet

Do the same for /etc/pam.d/gdm-password

Save the file and logout from GUI. Now you can login as root 

Some useful excel tips


tab for horizontal moving


enter for vertical moving


shift + tab for  backing horizontally


shift + enter for backing vertically


ctrl + home to go to A1


home to reach the first row of the selected column


to navigate vertically faster


press the page down key


to go up faster


press the page up key


to navigate horizontally faster


alt+shift+page down


to go back


alt+shift+page up


to change or delete the content of a cell you need to select the cell and start typing


to use the clipboard click the x sign of the clipboard bar at the left upper corner


now you can have multiple values in your clipboard as


click and highlight any cell and click the copy button in the clipboard area,the value of the cell will be copied in the clipboard,now if you select any cell and clik one of the stored value in the clipboard the value will be put on the selected cell


undo=ctrl+z


redo=ctrl+y


to select adjacent group of cells


ctrl+shift+down arrow for vertical group of cells until it encounters an empty cell


ctrl+shift+right arrow for horizontal group of cells until it encounters an empty cell


to select non adjacent cells use ctrl + left click


current region=adjacent cells those have data


to select current region ctrl+shift+space


to select the entire worksheet


ctrl +a or the triangle sign at the right corner