You are on page 1of 11

ete8 o2 ar dat

Note -
Lf We weNt HO CJefe myltipJe directogieD thee
in the 8ame Jevel then We use boaces
If we want to (re2te imside porent the
we cdont use boces but we sepayete ercot
snol child feoward slash (1)

dac omanend
HOW meny

to Check unes wOrds,


WC Commandis useo
cherectoTS jn a file
It is called as woTd Coynt

wC Filename externgion
Syntar

e tex fle ned.tRt


v w new.txt
77 455 6584 text fije
Here
NO OF uneg
WoTds
a455 NO of
No. of Chore CHOTS Or letteL
16584 foe wnicn
Teu us fi]e name
tex File new tt
uWC Commeng
we ere Usng
men command
he Command
used to View uUSer mam ya foo

Wen Commandneme

CatCat Commen
s e o d to view the content of +he Ple
Al&o, TO Vjew the date of 2 or mote F les
I nhe neuoAle
TO mesge the deta of 2 or mo6efile j
We Can do Concatenation aH BO

09 Ca+ filen ame.extension

vg cat PTenit-tAt
(It will show thedeta petia poenit-tat Aie)

Cat preposit'osn. pdf


Nofe To See pdf fije we can not uB 8ee PTOPel
for that we need gTO etY applk8hHom on

the teominal

NoW
To Vjew data of a o0cmolè files at aHme

CBt Filename1.exKt Filename2.ext flenam3. ent|


Ca+
siSIt will shouw1.txt
data
atat
Pranit.tt
of 1.tat
psanlt.tat hen 2txt
and then
A1SD, 8UPPOSe wa nave to
n &eedata of files
dieferent diveCtooy +hen Peent
cat Peth1 Fileneme. ett Path2
fjename.ext
eg
Cat A Pranit t t C|D11.1t
CD1.tt
T O mesge the data of R 05 mose Ales in+h
new fre

cet flename4 extenMorn


tenamea. extznaw Pte
This wi|| CTRBte 10the
urentt po&itHOn
eg
$ cat 4-tAt tt 3.txt

This will mesqefle 1txt and 2.txt in file 3.txr


in the yareort loCaHon ie. here home

Cet 1tAt EXt >A|BI 3ityt

This will merge fje 1. txt and 2:txtin file 3.tt


A l B locaHdn ie endez B here
v Command l6l thhe exaHra
tS used to modif thedete
fle and
1o («ate ney l e cno qd dato
I S alju uscd
nt
Vi Comnen
10 mod ifexisting file unng

Steps vi fijenamt. eztennon


Prey rrt fox insert
le b move inslde the istrt mode
3add modifie the Ale
) phen efte CompleHo) of ma4IE# C©Hon
Pes esc to move out of insertE
mode
write ":wq" Then ete
le tomove out to tem)yal feom Ale
Save anc

To Create neuwflle 8nd add dete n it.


Same ebove Bteps need to be follow to (veetenew fijear
Bdd deta in lt

*touch Command
TO Creefe on
empty File

touCh fijeneme
4 touch 3-tqt New emPt1 FIje (reejed
A D, fouh A)B|3.tyt A 1ocatHon A[B
3 +1t empt ile
C3Reted
Then with the help of vi commend we can edd
ate in t
differemte belween vi and ouCh i that
|-vi & ued +o (re8te ne file end add dta
in ft
AeA AlID tit used to madify existing Fije

-Jouth is used to ereete new empy File wetan


not add info init qnd we (en oot mdify eztHM
pileby touth

head commbrd
It Will dsp}ay flrs+ 10unes of the dou met
A l p t wil display how mutn tine we went
But io ead Commed
Ttwii displey no of UMes peom +he toP

always.
bydefeult 1 wll dbpley fhst 40unus of doc

0 he8d fileneme exteuiog

en heed PrenttE
eg It will display 4onus of painttxt
foom Stovt gwag
0 head -n filenamec fxteneion

eR s head -3 Prenit t1t


twl dkpley finst 3 dne Aom thestaytHn

teil Commend
0 It wi| dspley lest 40 Aines OF the doument
I t will elkd dikpley 00.otu'nus Ppom hu
botom 0d end Bd efeu ltlr w'I|Show iou'uo kam
m
betom
O Itail filenems extensio)_
ug tei pranit tat
dtpley,10 tnuy epm otom
ast
teil - fileneme.extenyon

g teil - 8 poeni+ "tdt


displey3,3 tme Peom bottom

pipos in UNI * - (1)


sed to walte myltple tommand in a dngle ine
and next command depends on previOus
Corm men

SInHan
Ommand4 Commend a commana3.

14 Firstly Perferm: comBnds on ouofile hen


Peor
whotoNA the output (omes ftorn
commanda it uwi
aive in this autput « inputt in
commenda ve
wiye SO on

with this he}Pof Pipes wa Can


une i yoIx .
get Yie uhat ejez
ie head -n filename. et tel-n2 hep
g heed -8 PYenH-tt| teil -8

Img Syppose we wote hexe Uke


head-8 prani Kt|tail -3 Poenittxt
It w 8ive Commend a hese ag in put, 3 f1st
neo of doco but as m 8eCond Commend
the fenema: eot" menHomd Thelr no wse
ofoutputi of commend 1 foo the Commanda h
betewa It will 8now 'Jost 8 tmep off
p%BnHtt
Hence A|WEs Remembet
O0 at fiost Commend ia plpeo we poOVde
Ahenoma al0na wth extens)on.qong fooweno
in Commønds fjeneme otoeoulred.

s head -3 Poonittat| tall -9


Show Une no 61 d 8 ol
je
Mog This pifecs ged for f]eo only not Aer
diYeyeoy
levs Commend
Thi's Command is used je displ8 the file d
Pege by paqe
dano
J 1twi dvide the fijo dato in pagD.

He tilename ectensMon

e s Je texr Fie new-txt

Steps
)pre 9paCe bar to move fo neRt Page
prey b" to move to poenious Poge
pres q" t move fo Flost Pege Fom eny
o CBon
PTOD Shift +a" D move o lstt
pat
fom Snn loOHon.
pam q To mWe outof documet.

but The drawbeK of th omwand


Lthet we cen ao fooWlard bexwogd
t no1 hoD Mence 80mattme its pagu but
(oAumug
toyndasend tyet 2oiug next page or
psevio peoe
* moxe Commanmd
To disPey tnedete of file, poge by rage along
wtn pex centaae

more lleneme. ettengjon


Hese
8teps
prewspece barr to moveto next page
Pres b" to move to poerioys page
9 p a To move out Feom h e do

Note Ae Cen 0t ue ja+n endshift "


CDmmero e we en go to Asst paqe Peom
Sny pend end
We Cn not goto Jsst page feom eny oCa tio)
Thtae as the doewbeike
0 thi It wi Shouw pesanteqe of dete dspkaiv
and we iCome to KnoW-het We aee ong to nex

Al0, when we onme out oh- doc by Peemna "q"


It StHll 3how data on temmel but Jun command

o 0t do thet Th Xa| to ogedpaUn omore Cowmamo


chmodo Commen
R-jc chanae modo om mNa
the a(tem
hi Commend is uko to modilM
Açcem aways modifjed by heOnL or
oy je who eves Ciuated +hot fHegroieg
Oy thot pelkon (on maq b megcc

Theren 8se tt00 h Wa of doing modf


D1e Byung anmt opeiBor
Byuna numeec way
TW
hecs (o)
O ysing amgament operHoY
Hese
+ ue to edd new octe
is ted to emovo eisting qtttm
To a8h ) ACceyes

Mme commend we epoeruntfer

oup

Suppes for u heu ts w- sd


wehare to meke t rw hon

Noecommend
,for giving aCcem

Chmod + Dtext fiegpma tounicnit cngn


what additon here execuHon accem istvo)
nomL To whom

$ 0 coob CheuK
w z r - - r--
Btet
the toloua is Changote areen
and t oepresent on B txt we peamor
Chmad
NoW WehaVe -TwXr--Y--
,

Ne have0 maKe fote use TW and foe


0oup TW at e +ime
Initia
W- YwnT-- AfteT chanse
chmod -atw B.txt
- rw-v w -

Suppose wehave fo makea Y- PeD


0nlt
w aL
Thesl
v -W BtXt
A0)
= r B.txt w e tan wol}te hd
NOW
Pp We wolte,
-
vchmoo 4A=ow
Tw TWLSW
Btt

You might also like