Archive for the 'linux' Category

how to know history of commands in shell

October 5, 2008

HI all its very easy
for some shell its
> history n where n is the number of last executed commands . like to know the last 10 commands just [...]

how to know which bash version u r using

September 22, 2008

based on ur default shell , suppose ur shell id /bin/sh , then
> /bin/sh –version OR if its bash , then
>/bin/bash –version

how to know the linux version

September 22, 2008

Its very easy , just type this in ur terminal
> lsb_release -a

How to search a word in all files in linux

August 8, 2008

This is very easy and can be done by using grep command .
> grep -R “word to search” * > log.txt
Well only grep -R “word to search” is enough .It will display the result in terminal. If you are using > sign , then it will be written in that log file.

How to find any files in dir and its subdirectory

July 29, 2008

its very simple
> find -name “*.html” | grep “index”
Here to find index.html in the current directory and subdirectory .. .use find and grep to find the file .

how to unpack the jar file in linux

June 16, 2008

The command is very easy .
> jar xf yourjar.jar
This will unpack the jar files and make folders like com and jar bean .jar files

how to zip file in linux

May 13, 2008

suppose there is folder name “backup” containing subfolders and files then,
> zip -r backup.zip backup

how to find difference between two revisions in svn

April 22, 2008

shell > svn diff -r filename
It will show +++++ where the changes had been done.

how to take backup myqsl dump in linux

April 15, 2008

shell> mysqldump -u root -p –all-databases > db_dump.sql

how to download the contents in linux

April 11, 2008

wget (http://downloadURL.com)