Linux Cmds
Linux Cmds
:
DATE: MAR. 10,2010
wc command
This command is used to count the no. of words, letters and lines etc.
Syntex:
$ wc filename
( It displays no. of lines, words and characters with filename )
$ wc –l filename
( Displays no. of lines with filename )
$ wc –w filename
( Displays no. of words with filename )
$ wc –c filename
( Displays no. of characters with filename )
uname command
This command is used to know about the operating system’s name, version etc.
Syntex:
$ uname
( Displays name of O.S.)
$ uname –r
( Displays version of O.S.)
$ uname –n
( Displays hostname )
tty command
It displays the name of terminal with absolute path.
Syntex:
$ tty
Escaping and Quoting are two techniques which are used to avoid the special
meaning of meta characters.
1. Escaping (\)
In this technique we place \ (back slash) before the meta character. It escapes the
effect of single character after it.
e.g. $ echo \*
( In this case the output is * )
PAGE NO.:
DATE: MAR. 10,2010
2. Quoting
In this technique we use quoting to avoid special meaning of meta characters.
e.g. 1. $ echo kuldeep mittal
( output is kuldeep mittal )
2. $ echo “kuldeep mittal”
(In this case output is kuldeep mittal )
3. $ a=5
$ echo “value of a is $a”
( In this case output is value of a is 5 )
4. $ a=5
$ echo ‘value of a is $a’
( In this case output is value of a is $a )
Command Substitution