Linux For Hacker Part Three

Welcome again.

Mugace kambere twarebeye hamwe ibyerekeye file systems,CD command cyangwa change directory command nibindi byerekeye inux .mugace kakabiri ho twarebeye hamwe uburyo wabonamo icyo wifuza.

Muri akagace rero ho turarebera hamwe ibi bikurikira

1.uburyo ushobora gukora file(create files)

2.uburyo wakora directory(create directory)

3.uburyo wahanagura file(remove or delete file)

4.uburyo wakora copy ya file (Making Copy)

5.uburyo wakwita file izina (renaming file)

6.Uburyo wahanagura directory cyangwa wasiba directory(Deleting Directory)

Reka dutangire !!!!!

1.Creating File

     1.Nano

Hari uburyo bwinshi wakoresha ushaka gukora file muri linux ariko hano turarebera hamwe uburyo bubiri bukunzwe gukoreshwa .

[1]: Hari uburyo bwogukoresha nano akenshi nano iza itari muri linux zimwe na zimwe bikaba byagusabako umanza kuyishyira(install) muri linux operating system yawe ariko kubakoresha operating system ya Kali yo iza irimo ntakibazo.kubari gukoresha kari linux fungura terminal yawe ubundi wandike nano ukurikizeho izina ushaka kwita iyo file yawe harahita hafunguka window ushobora kwandikamo ubundi wandikemo ibyo ushaka kugira ubashe kubika ibyo wanditse urakanda ctrl+x  baragusaba kwemeza ibyo wakoze ubundi ukande kuri keyboard yawe ubundi ukande Enter kugira wemeze ibyo wakoze  file ibe irakozwe ako kanya .

Kugira urebeko file wakoze andika muri terminal command ikurikira

[*]: ls iyi command ya ls  ikora list yibintu byose biri muri directory (Folder) urimo. ushobora kubona ibisa nifoto ikurikira

[2]: Uburyo bwakabiri nubwo gukoresha command ya vi,  uko ikoreshwa:

[=>]: vi linuxforhackerpart3.vi.txt

fungura teminal yawe andika izi vi ukurikizeho izina ushaka kwita file yawe nurangiza ukande Enter kuri keyboard yawe harahita hafunguka window ushobora kwandikamo kandi Ubundi wandike ibyo ushaka muri iyo file nurangiza ukande esc key kuri keyboard yawe kugira urekere kwandika koresha andika ibi bikurikira kugira ubashe gusavinga ibyo wanditse unafunge iyo window :wq , kanda ls urebeko iyo file yabashije kuba yakorwa.

Ubwo nibwo buryo bubiri ushobora kwifashisha mugihe ushaka kuba wakora file runaka ukoreshe commands

[=>]: koresha cat  ukurikizeho izina rya file wakoze kugira urebeko ibyo wabashije kwandika byakunze .

urugero: cat linuxforhackerpart3.txt uraza kubona amagambo yose wanditse muri file wakoze

Ubu nibwo buryo nahisemo kubagezaho wakwifashisha ukaba wakora file runaka.

2. Creating Directory

Muri linux commmand idufasha kuba twakora directory (Folder) ni mkdir.

Uko ikoreshwa fungura teminal yawe andika mkdir ukurikizeho izina ushaka kwita folder yawe ubundi ukande Enter kuri keyboard yawe, kanda ls urebeko yakozwe.

urugero: mkdir newdirectory

Urebye kuri iyi foto urabonako directory yitwa newdirectory  yamaze kuba yakorwa ,ushaka kuyinjiramo wakoresha cd newdirectory  ukaba wayinjiramo ugakoreramo ibindi ushaka nkokuba wakoreramo andi ma file nibindi.

3.Delete File (uburyo wahanagura file runaka udashaka)

Guhanagura file nibyo bintu byoroha muri linux bikora hifashishijwe rm command.

Uko Ikoreshwa: wandika rm command ugakurikizaho izina rya file ushaka guhanagura .

Hano ndakoresha iyi command ya rm nsiba file twakoze mbere ifite izina rya linuxforhackerpart3.txt  nindangiza ndakoresha command ya ls kugira ndebeko ya file yasibwe.

urugero: rm linuxforhackerpart3.txt

ureye kuri iyi photo urabonako file yitwa linuxforhackerpart3.txt yavuyemo

4. Copying File (Uburyo ushobora gukora copy ya file runaka)

Iyo ushaka gukora copy ya file runaka muri inux ukoresha cp command icyo iyi command idufasha ituma tubasha gukora copy ya file runaka tuyijyana muyindi directory tugasiga file yindi muri directory yayo.

Nimba nshaka gukora copy ya file yanjye yitwa linuxforhackerpart3.vi.txt nkakora coy yayo muri directory twakoze yitwa newdirectory ndakoresha command ya cp  nkurikizeho izina rya file nshaka gukorera copy nindangiza nkurikizeho directory nshakako ijyamo.

Urugero: cp linuxforhackerpart3.vi.txt newdirectory

kugira urebeko file yawe yagezeyo andika cd ukurikizeho izina rya directory washyizemo iyo file nurangize ukande ls  urebeko irimo

[:]: cd newdirectory

[:]: ls

Urabona file yanjye yageze muri directory yitwa newdirectory.

5. Renaming File (Uburyo ushobora kwita izina file runaka)

Ubundi urebye Linux ntabwo ifite command yihariye yo kwita izina file nkuko windows Operating system ibigira cyangwa andi ma Operating System. Linux yo ikoresha mv move command.

Move command ishobora no gukoreshwa ijyana file cyangwa directories ahandi hantu hashya (new location) cyangwa ikaba yanakoreshwa yita izina file cyangwa directory.

Hano reka mpindure izina rya file twakoreye copy muri directory ya newdirectory ndayiha izina rya changed.txt

urugero: mv linuxforhackerpart3.vi.txt changed.txt 

umaze gukora ibyo uhite ukanda ls urebeko izina ryabashije guhiduka

 

Nkuko ubibona kuri iyi foto iri haruguru urabonako linuxforhackerpart3.vi.txt yahinduye izina ikaba changed.txt

6Removing Directory (Gusiba directory)

Hari uburyo bubiri ushobora gusiba directory uburyo bwambere nugukoresha rmdir  ugakurikizaho izina rya directory ushaka gusiba.

Uburyo bwakabiri nubwo gukoresha rm ugashyiraho flag ya -R ugakurikizaho izina rya directory ushaka gusiba

Uko ikoreshwa : fungura terminal yawe andikamo rm ukurikizeho izina rya directory ushaka gusiba.

[:]: rmdir directory name

[:]: rm -R directoryname  iyi command ya rm -r ikunda gukoreshwa cyane cyane iyo ushaka gusiba directory ifite ibintu .

Urugero: rm createdone

Kuri iyi foto iriharugura nabanje gukora directory yitwa createdone ndangije nza kuyisiba nkoresheje rmdir.

Nimba aribwo bwambere ugiye gukoresha iyi command nukwitonda cyane kuko iyo ukoreshaje rm -r command ushaka guhanagura directory runaka ishobora kuba ari home directory cyangwa andi ma directory aba abitse ibintu byingenzi iyi command yo ibihanagura ntacyo yitayeho .

Rero bigusaba kumenya neza directory ushaka guhanagura kuko bitabaye inyo ushobora guhanagura directory yingenzi.

 

Bonus:

Ubundi buryo ushobora kwifashisha ukaba wakora file,ushobora kwifashisha command ya touch

uko ikoreshwa , fungura terminal andika touch kurikizaho izina ushaka guha file yawe ubundi ukande Enter kuri keyboard yawe.

Urugeri: touch thisisbonus.txt

Harikibazo cyangwa igitekerezo watwandikira muri comment box cyangwa kuri page yacu ya facebook .

Kora share usangize nabandi Murakoze

 

 

 

 

 

 

 

 

Leave a Reply

Your email address will not be published.