Yiqiniso, ukunikezwa kwesistimu yokusebenza kwi-kernel ye-Linux ngokuvamile kunesibonisi esibonakalayo esivela ngaphakathi nesiphathimandla sefayela esikuvumela ukuba usebenze nezinkomba kanye nezinto eziqondene nawe. Kodwa-ke, ngezinye izikhathi kuyadingeka ukuthola okuqukethwe kwifolda ethize nge-console eyakhelwe ngaphakathi. Kulesi simo, umyalo ojwayelekile uthola usizo. ls.
Sebenzisa umyalo we-ls ku-Linux
Ithimba ls, njengabanye abaningi ku-OS okusekelwe ku-kernel ye-Linux, isebenza ngendlela efanele nayo yonke into yokwakha futhi ine-syntax yayo. Uma umsebenzisi ekwazi ukubhekana nokufaneleka kwesabelo sezimpikiswano kanye ne-algorithm yokufaka jikelele, uzokwazi, ngaphandle kwezinkinga, ngokushesha ngangokunokwenzeka ukuthola ulwazi oludingayo mayelana namafayela kumafolda.
Ukuthola ifolda ethize
Okokuqala, qiniseka ukuthi uqonda inqubo yokushintshela endaweni oyifunayo "Isikhumbuzo". Uma uskena amafolda amaningi kumhlahlandlela ofanayo, kulula ukwenza okulungile ukusuka endaweni efanele ukugwema isidingo sokufaka indlela egcwele entweni. Indawo inqunywa futhi ushintsho lwenziwa kanje:
- Vula imenenja yefayela bese uvakashela lwemibhalo oyifunayo.
- Chofoza kunoma iyiphi into ku-RMB bese ukhetha "Izakhiwo".
- Kuthebhu "Okuyisisekelo" qaphela into "Ifolda yomzali". Yilokho okudingeka ukhumbule ukuze ushintshe okunye.
- Ihlala kuphela ukuqala i-console ngokusebenzisa indlela elula, isibonelo, ngokucindezela ukhiye oshisayo I-Ctrl + Alt + T noma ngokuchofoza isithonjana esifanayo kwimenyu.
- Ngena lapha
cd / ekhaya / umsebenzisi / ifolda
ukuya endaweni yenzalo. Umsebenzisi kulokhu, igama lomsebenzisi, futhi ifolda - igama lefolda yokugcina.
Manje ungaqhubeka ngokuphepha ekusebenziseni umyalo ocatshangwayo namuhla. ls usebenzisa izimpikiswano ezahlukene kanye nezinketho. Sinikeza ukujwayela izibonelo ezisemqoka ngokuningiliziwe ngezansi.
Buka okuqukethwe kufolda yamanje
Ukubhala ku-consolels
ngaphandle kwezinketho ezengeziwe, uzothola ulwazi mayelana nendawo yamanje. Uma, ngemuva kokusungula i-console, akukho ukushintshwa okwenziwecd
Uhla lwamafayela namafolda erekhodi lakho lasekhaya luboniswa.
Amafolda amakwe nge-blue, kanti ezinye izinto zimhlophe. Konke kuzoboniswa komugqa owodwa noma ngaphezulu, kuye ngokuthi inani lezinto. Ungabuyekeza imiphumela bese uqhubeka.
Bonisa izinkomba endaweni ecacisiwe
Ekuqaleni kwalesi sihloko kwatshelwa indlela yokuhamba ngendlela edingekayo ku-console ngokusebenzisa umyalo owodwa kuphela. Endaweni yakho yamanje, uhlul ifolda
kuphi ifolda - ifolda igama ukubuka okuqukethwe kwalo. Umbuso awubonisi nje kuphela izinhlamvu zesiLatini, kodwa futhi u-Cyrillic, ngokucabangela irejista, okuyinto ebaluleke kakhulu ngezinye izikhathi.
Sicela uqaphele ukuthi uma ungakaze uhambise endaweni yakufolda, kufanele ucacise indlela eya kuyo ngomyalo ukuze uvumele ithuluzi ukuthola into. Khona-ke umugqa wokufaka uthatha ifomu, isibonelo,ls / ekhaya / umsebenzisi / ifolda / isithombe
. Lo mthetho usebenza ekufakeni nasezibonelweni ezalandela usebenzisa iziphakamiso nemisebenzi.
Ukuchaza umdali wefolda
Lalela i-syntax ls yakhiwe ngendlela efanayo nakwezinye izinsiza ezijwayelekile, ngakho-ke ngisho nomsebenzisi we-novice ngeke athole noma yini entsha noma engajwayelekile kuwo. Ake sihlaziye isibonelo sokuqala lapho sibheka umlobi wefolda nosuku loshintsho. Ukuze wenze lokhu, fakals -l - ifolda ifolda
kuphi ifolda - igama lomqondisi noma indlela egcwele kuyo. Ngemuva kokusebenza, uzobona ulwazi olufunayo.
Bonisa amafayela afihliwe
I-Linux inenani elikhulu kakhulu lezinto ezifihlekile, ikakhulu uma kuziwa kumafayela wesistimu. Ungabonisa kanye nalo lonke uhla lwemibhalo ngokusebenzisa inketho ethile. Ithimba libukeka kanje:Igama lombhalo ls -a + noma indlela
.
Izinto ezitholakalayo zizoboniswa ngezixhumanisi endaweni yokugcina, uma unesithakazelo kulolu lwazi, vele ushintshe icala lempikiswano, ukubhala kulokhu-A
.
Hlunga okuqukethwe
Ngokwehlukile, ngingathanda ukuphawula ukuhlelwa kokuqukethwe, ngoba ngokuvamile kuyasiza kakhulu futhi kusiza umsebenzisi ukuthola idatha edingekayo ngemizuzwana. Kunezinketho eziningana ezibhekene nokuhlunga okuhlukile. Okokuqala, qaphelaIfolda ls -lSh
. Le mpikiswano ibala amafayela ngendlela yokunciphisa usayizi wabo.
Uma unesithakazelo kumephu ngokulandelana okulandelanayo, kuzomele uhlanganise incwadi eyodwa kuphela ku-mpikiswano ukuze utholeIfolda ls -lShr
.
Imiphumela iboniswa ngokulandelana kwe-alfabhethi ngokusebenzisals -lX + igama lomqondisi noma indlela
.
Hlunga nge-last modified time -ls -lt + igama lomsebenzisi noma indlela
.
Yiqiniso, kunezinketho eziningi ezingavamile, kodwa zingase zisebenzise kubasebenzisi abathile. Lezi zihlanganisa:
-B
- ungabonisi ama-backups okwamanje;-C
- imiphumela ephumayo ngesimo samakholomu, hhayi imigqa;-d
- khombisa kuphela amafolda ngaphakathi kwerekhodi ngaphandle kokuqukethwe kwawo;-F
- ukubonisa ifomethi noma uhlobo lwefayela ngalinye;-m
- ukuhlukaniswa kwazo zonke izakhi ezihlukaniswe ngama-commas;-Q
- thatha igama lezizinto ezincaphuno;-1
- bonisa ifayela elilodwa ngomugqa.
Njengoba manje usuthole amafayela adingekayo kumarekhodi, ungadinga ukuwahlela noma ukucinga imingcele edingekayo ezintweni zokuhlela. Kulesi simo, omunye umyalo ohlangene obizwa i-grep. Ungajwayelana nesimiso sesenzo salo kwezinye izihloko esixhumanisi esilandelayo.
Funda kabanzi: Izibonelo ze-Linux grep
Ngaphezu kwalokho, kunohlu olukhulu lwamasevisi asebenzayo ajwayelekile we-console namathuluzi ku-Linux, okuvame ukuba usizo ngisho nomsebenzisi ongenalwazi. Funda imininingwane eningiliziwe ngalesi sihloko ngezansi.
Bheka futhi: Izimiso ezisetshenziswa njalo kwi-Linux Terminal
Lokhu kuphetha isihloko sethu. Njengoba ungabona, akukho lutho olunzima eqenjini uqobo ls futhi i-syntax yayo ayikho, into kuphela edingekayo kuwe - ukunamathela emithethweni yokungena, ukugwema amaphutha ngamagama wezinkomba bese ucabangela amarejista okukhethwa kukho.