Professional Documents
Culture Documents
m
? Ý
?
?
?
?
?
?
?
?
!
? "#$
$
?
$
Æ 3
? ë
2 #
3
?
m
2 m% 4
3
? Ô
2 %
53
? g
2 $ ,!
%
3
? m
2 m! 3
? m
"($)*2
3
9
? Ý
2 6*2
% 3
?
2 m 1
$3
?
2 1 #
3
$3
? g
!m)
2
%
3
? 9
m
mm
2 ,mÆ3
? "7*2
3
9
? !"
? !2
?
? m
? !
? !
9
server
0 t 1 t
e tasks are laced i t e back r d w ile t e
ser c ti es t w rk i t e f re r d.
A back r d task is essetially a - iteracti e task.
9
?
8 3
? 9*
?
m
*******************************
***
Ôransfer
,*%
of control
Re uest for
services
? m
3
m
? $:
3
?
3
?
2
7
3
? :
?
?
99 3
39 9 99 > 3
? Ô
m
?
99333
9 93
? :99
? : :m6'##
9 m
?
3
3
File hierarchy
m m
Ô
?
? Æ
? m
?
@
? %
? , 2
? 0$0
9
? !7A
? (
? !
? (
? m
? %
? Æ
*
? 6
? Æ
*
2
? %
? Æ
m
? 9*
? 9*
"($)
? 9 *
"($)
? 9
*
? 9* %
? 9
*
9
? ' "($)
3
?
7
5$Æ?
@3
? Æ
? B
C
B C
g ñ
? P P
? ~ [ [X
? '7
?
7?
@3
?
* *
* 7 ?33
7@3
? !
? V !
? * !
2
? * !
3
? * !
2
-
- tes Nae eai
?
5
le - tes
le - tes - thi eclse i
le tes reve eai f that characters (except \ a $).
' Sile tes 'Sile tes' - Eclse i sile tes reais chae.
` Bac te
`Bac te` - Ô exec te ca
7
? m
@0
=@,2
? 6
? !
2
? #
8
?
? [ r
2
? ~ 28
?
8
? î 2
8
? ºî 8
? ô
8
? a PP 28
?r
? a PP
2
=A-
ñ
ñ
? m
? !
2
3
2 3
?
2
3
3
?
2
3
?
? 2
?
@
? ?
@
?
?
@
ñ
?
2
3
BDB3
? '3
? :D
? 6
?
@
2
2
3
? $
2
B*C
5 2
3'3
? :E
D
BCF
ñ
?
? 3" ?
@
? 0
? $
?
BFC
3
? '3:F
? 6
2
BC3
? '3:FF
? FF
3
ñ
?
3
? ' B
C
3
? /
B=FC
<
? ': =F 3
? 6 B C
C7
B(
C
B C
3
? B=C
3$
G
7
3
¬
¬
m
m
m
m
Examp !
pt
md1 | cmd2 P
pe stdout from one command to std
n of another.
cmd < f
e Read std
n from a f
e.
cmd << text Read std
n unt
reach
ng a
ne
dent
ca to p p .
cmd > f
e Red
rect stdout to a f
e. (overwr
te
f f
e ex
sts)
cmd >> f
e Append stdout to a f
e.
cmd 2>f
e Red
rect stderr to a f
e. (overwr
te
f f
e ex
sts)
cmd 2>>f
e Append stderr to a f
e.
Example Description
cmd1 2>&1 | Pipe stdout and stderr from one command to stdin of another.
cmd2
cmd < f1 > f2 Redirect stdin and stdout simultaneously.
cmd > file 2>&1 Redirect both stdout and stderr to a file. (overwrite if file
exists)
cmd >> file Append both stdout and stderr to a file.
2>&1
cmd > f1 2> f2 Redirect stdout to the file ô and stderr to the file ô . (overwrite
if the files exist)
cmd >> f1 2>> Append stdout to the file ô and append stderr to the file ô .
f2
cmd | tee f1 Redirect stdout to the screen and to the file ô . (overwrites ô
if it exists)
cmd | tee -a f1 Redirect stdout to the screen and append it to the file ô .
£
E m
m ; m E m mm m
{ m ; m ;E} m mm g
m ; m E m mm g
E m g
m m E ~ x E ~ ~
x
x
m m E
~ x E
~ ~
x
? rire Ȃ outrut of one command is surrlied as inrut to
6
another
? tee Ȃ read standard inrut & writes to std o/r & the file of
user choice
Ôo create a Unix user id following information is required
1. User Name
2. User Id
3. Grour Id
4. Home directory
5. Login shell
? User name Ȃ must be unique consisting of 2-8 letters
and numerals
? User id Ȃ Unique user id ranging from 100 to 60,000.
User IDǯs 0-100 reserved for system users
? Grour id Ȃ unique numerical id to which the user
belongs. Ranges from 100-60,000
? Home directory Ȃ identifies userǯs home directory rath
? Login shell Ȃ identifies the user shell
Various shells are:
Bourne shell (sh), korn shell (ksh), C shell (csh), bash shell
(bash)
Ôhe user and grour information is stored in following files:
£ ¬
/etc/rasswd
/etc/shadow
/etc/grours
Àrerates in two modes
w
? Insert mode
? Command mode
? Line dd
? Word dw
Corying is called yanking in vi
Yanking Ôext
? Line yy
? Character
yl
Putting Ôext
? Put after rosition or line r
? Put before rosition or line P
? mearch forward /string
m
? mearch backward ?string
Ôhe syntax is
:%s/rattern/string/flags
Àr
:start line no., end line no. s/rattern/string/flags
flags Ȃ g, c
? Exit saving changes :wq
-
? Quit (unless changes) :q
? /
:
3
?
2
7
mIJ:/ÆFJ
?
3
? @3
? $ %
? 3
? '3
? m
? %2*
? %2
? m 6E
g m
? m
7
? 4
? 0
? m %
? m
? / 27
? %
?
?
?
m
?
3
? '3
? : K
H
?
?
?
?
!
"
3
ë9
?P
? P
? a 2
? ~
[
? ~ *
? ~
? rJ
9
? ~r
=
?
=
?
?
[
? ~
?
?
? P
? r a[
2
? J~ 9
9
G
? rs Ȃ rerort rrocess status
? -e Lists information about all rrocess now running
? -f Full listing
? ls Ȃ directory listing
? -a list all entries including those beginning with .
? -l long listing
G
? cat Ȃ concatenate and disrlay files
? -b number the lines as in Ȃn but omit numbers for blank line
? -s silent about non-existent files
? cat <filename>
? find Ȃ find files
? -name Ôrue if rattern matches the current file name
? -rrint causes current rath name to be rrinted
? find <rathname> -name <filename> -rrint
? grer Ȃ search a file for a rattern
? -l rrint only the name of the file with matching lines
? -v rrint all lines excert those that contain the rattern
? date Ȃ write the date and time
? date Ǯ+%m%d%yǯ
? -u Ȃ disrlay the date in GMÔ
G
? cr Ȃ cory files
? -i interactive cory
? -r cory files and subdirectories
? cr <source_filename> <destination_filename>
? mv Ȃ move files
? -i asks for confirmation before moving if file already exists
? -f move without rromrting
? rm Ȃ remove files
? mame ortions as cr/mv
? who Ȃ who is on the system
? -m Ȃ outrut info about current terminal
? -q Ȃ disrlay only names and number of users currently logged in
? whoami Ȃ disrlay the effective current username
G
? rwd Ȃ rrint working directory
? wc Ȃ line, word and character count in a file
? -l Ȃ count number of lines
? -w Ȃ count number of words
? raste
? -d Ȃ delimiter character
? -s Ȃ concatenate each serarate line in a file into a single line
? raste <first filename> <second filename> > <Àut_filename>
? tr Ȃ translate characters
? tr Ǯ[a-z]ǯ Ǯ[A-Z]ǯ < <inrut_filename>
? shift
? 6
#2
? %
? (
? m7ln filename linkname
? m #2
? %
?
? m7ln Ȃs filename linkname
? 5
?
?
?
? 4
?
?
?
BNC
? '
? '
? '
? '
m m
? mhell mcrirt is
$ written
m
. mhell scrirt is just like batch
m file is Mm-DÀm but
have more rower than the Mm-DÀm batch file
? %
O
7
3
? /
Q
ë g
9
3
3
=3 $ 9
?
9 @3
? ':
? Imm
33
:G
D D
D
D
D
D
D
DD !" "
?
7
3
Examrle:
BSC99
RR
$
7
EBSC99
;;
" ;;
RR
EBSC99
;;
RRT
KL
L
H
m Ô
? B7C
3
? /
7
3
?
B7C
3
? $
3
? $
4 3
? $
7
=7
9 #
? myntax: 9#
~ ~
~ ~
~ ~
? myntax:
ô~
~
~~
P ô ~
~
~~
P ô
~ ~
~~
ô
? BC
3
?
Rea na
pe
a 73
eann
? ( $
$
3
$
%"
& "
$
m
Ôes x saus
'
'
( '
(
)( '
$
'
9 Ô
Ôes eann
!
ë
? #
pe a eann
)
& *'
& !
& *+
m
? 1
!***3
? ) %
?
D
~~
~~
~~
~~
?
!"#$
!"%
"&'(
9
? /
:G:3
? /
73
? 0
3&
3
)
*!"*+**#$
!",-
-
?
m
%
7D;G O#2
O
7D
* O
*
:
7GD;D;* O
O
O
?
7
m
%
#10$#'I 37
7F; O#2
O
7F:#10$#' O
*
K# H
0
??>>II>=>@@ 5
??>>NI>=>@@ 5
??>>D>=>@@
??>>F>=>@@
??>>DI>=>@@
??>>FI>=>@@
m
m
0
VV>>II>=>WW 5
VV>>NI>=>WW 5
VV>>D>=>WW
VV>>F>=>WW
VV>>I>
>WW
VV>>NI>
>WW
VV*4> >WW
VV*> >WW
V7IE 2I8W 7
V7IE2I8W
7
9
$>7
>
>
?@>
>7
>
>
?@>
>
?@>
9
>
>
>
>@>
?@><<
>
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