Zowonadi, pakugawa kachitidwe kogwiritsa ntchito pa Linux kernel, nthawi zambiri pamakhala mawonekedwe owoneka bwino ndi oyang'anira mafayilo omwe amakupatsani mwayi wogwira ntchito ndi zolemba komanso zinthu zaumwini. Komabe, nthawi zina zimakhala zofunikira kuti mudziwe zomwe zili mufoda yeniyeni kudzera muzomangiriza. Poterepa, lamulo lodziwika limabwera kudzapulumutsa ls.
Kugwiritsa ntchito lamulo ls pa Linux
Gulu ls, monga ena ambiri mu Linux kernel-OS, imagwira ntchito molondola pamisonkhano yonse ndipo ili ndi syntax yake. Ngati wogwiritsa ntchito atha kudziwa kugawana koyenera kwa mfundo komanso zojambula zonse pazowonjezera, azitha kudziwa mwachangu zomwe akufuna pamafayilo omwe ali mumafoda mwachangu momwe angathere.
Kupeza foda yeniyeni
Choyamba, onetsetsani kuti mukumvetsetsa momwe mungasunthire kumalo omwe mukufuna kudzera "Pokwelera". Ngati mukuyang'ana zikwatu zingapo zomwe zili mgulu lomweli, ndikosavuta kuchita izi kuchokera pamalo oyenera kuti mupewe kufunika kolowera chinthucho. Malowa adatsimikizika ndipo kusinthaku kumachitika motere:
- Tsegulani woyang'anira fayilo ndikupita ku chikwatu chomwe mukufuna.
- Dinani pa chilichonse chomwe chili mu RMB ndikusankha "Katundu".
- Pa tabu "Zoyambira" samalani ndi chinthucho "Kholo la makolo". Ndiye amene ayenera kukumbukiridwa chifukwa chakusintha kwina.
- Zimangoyambira kutonthoza mothekera, mwachitsanzo, pakukhala ndi kiyi yotentha Ctrl + Alt + T kapena mwa kuwonekera pa chithunzi chogwirizana ndi menyu.
- Lowani apa
cd / nyumba / wosuta / chikwatu
kupita kumalo osangalatsidwa. Wogwiritsa ntchito pamenepa, lolowera, ndipo foda - dzina la foda yomwe mukupita.
Tsopano mutha kupitiliza kugwiritsa ntchito gulu lomwe mwalingalira lero ls pogwiritsa ntchito mikangano ndi zosankha zosiyanasiyana. Tikukulimbikitsani kuti muzidziwitsa zitsanzo zazikuluzikulu pansipa.
Onani zomwe zili mufoda yapano
Kulemba mu kutonthozals
Popanda zosankha zina, mudzalandira zambiri za komwe kuli komwe muli. Ngati mutayamba kutonthoza mtima pakadapanda kusinthacd
, mndandanda wamafayilo ndi zikwatu za chikwatu chanyumba chiwonetsedwa.
Mafoda amaunikiridwa mu mtundu wamtambo ndipo zinthu zina zimawunikidwa mu zoyera. Chilichonse chiziwonetsedwa mu mzere umodzi kapena zingapo, zomwe zimatengera chiwerengero cha zinthu zomwe zapezeka. Mutha kudziwa zomwe zalandilidwa ndikudutsanso zina.
Onetsani zowongolera kumalo omwe mwaperekedwa
Kumayambiriro kwa nkhaniyi, takambirana za momwe mungayenderere panjira yofunikira mu kontrakti ndikuthamangitsa lamulo limodzi lokha. Pompano, lembanils chikwatu
pati foda - dzina la chikwatu kuti muwone zomwe zilimo. Kugwiritsa ntchito moyenera sikuwonetsera zilembo za Chilatini zokha, komanso Korenchiic, poganizira zomwe zimachitika, zomwe nthawi zina zimakhala zofunikira kwambiri.
Chonde dziwani kuti ngati simunasunthe komwe akukhala ndi chikwatu, pakukulamula muyenera kutchula njira yofikira kuti mulola chida kuwona chinthucho. Kenako mzere wolowera umatenga mawonekedwe, mwachitsanzo,ls / nyumba / wosuta / foda / chithunzi
. Lamuloli likugwira ntchito pazowonjezera ndi zitsanzo zotsatirazi pogwiritsa ntchito zokangana ndi ntchito.
Kutanthauzira wopanga chikwatu
Lamula syntax ls omangidwa chimodzimodzi monga zothandizira zina zambiri, kotero wogwiritsa ntchito novice sangapeze chilichonse chatsopano kapena chosazolowereka. Tiona mwachidule chitsanzo chomwe muyenera kuwona wolemba chikwatu ndi tsiku la kusintha. Kuti muchite izi, lowetsanils -l - chikwatu
pati foda - dzina la chikwatu kapena njira yonse yobwererera. Pambuyo poyambitsa, mudzawona zomwe mukuyang'ana.
Onetsani mafayilo obisika
Linux ili ndi zinthu zambiri zobisika, makamaka pankhani ya mafayilo amachitidwe. Ndikotheka kuwawonetsa pamodzi ndi zonse zomwe zili mufayilo pogwiritsa ntchito njira inayake. Kenako lamulo limawoneka motere:ls - dzina + kapena njira yofikira ku chikwatu
.
Zinthu zomwe zapezedwa zikuwonetsedwa ndi malo osungirako, ngati mulibe chidwi ndi izi, ingosinthani zomwe mwatsutsana, ndikulemba pamenepa-A
.
Sanjani Zamkati
Payokha, ndikufuna kudziwa kusintha kwa zomwe zili, chifukwa nthawi zambiri zimakhala zothandiza kwambiri ndipo zimathandiza wosuta kudziwa zenizeni zofunikira pamasekondi. Pali njira zingapo zosinthira. Choyamba, daliranils -lSh chikwatu
. Kutsutsana uku kumayika mndandanda wa mafayilo ochepera.
Ngati mukufuna kuwonetsa mwanjira yokhotakhota, muyenera kuwonjezera kalata imodzi yokha pamkangano kuti muthels -lShr chikwatu
.
Zotsatira zake zikuwonetsedwa mu zilembols -lX + dzina kapena njira yotsogolera
.
Longosolani pofika nthawi yosintha komaliza -ls -lt + dzina kapena njira yopita kusungiratu
.
Inde, pali zosankha zingapo zomwe sizigwiritsidwa ntchito kwenikweni, koma zitha kukhala zothandiza kwa ogwiritsa ntchito ena. Izi zikuphatikiza:
-B
- osawonetsa zosunga zobwezeretsera izi;-C
- zotuluka zazotsatira mu mawonekedwe a mizati, osati mizere;-d
- kuwonetsa zikwatu zokhazokha mkati mwa zowongolera popanda zomwe zili;-F
- kuwonetsa kwa mtundu kapena mtundu wa fayilo iliyonse;-m
- Kupatukana kwa zinthu zonse zolekanitsidwa ndi ndalama;-Q
- tengani dzina la zinthu m'mawu;-1
- Onetsani fayilo imodzi pamzere uliwonse.
Tsopano popeza mwapeza mafayilo ofunika kuwongolera, mungafunike kuwasintha kapena kusaka magawo ofunikira pazinthu zosinthika. Poterepa, lamulo lina lomangidwa lidayitanidwa grep. Mutha kudzidziwa nokha ndi zomwe zimachitika munyengo yathu ina pa ulalo wotsatirawu.
Werengani Zambiri: Zitsanzo za Linux grep Command
Kuphatikiza apo, ku Linux mudakalipo mndandanda wawukulu wazinthu zofunikira zothandizirana komanso zida zomwe nthawi zambiri zimakhala zothandiza ngakhale kwa wosadziwa kwambiri. Werengani zambiri pamutuwu.
Wonaninso: Malamulo Omwe Amagwiritsidwa Ntchito Ponseponse mu Linux terminal
Izi zikutsiriza nkhani yathu. Monga mukuwonera, palibe chovuta mu gulu lenilenilo ls ndipo kapangidwe kake kulibe, chinthu chokhacho chomwe chikufunika kwa inu ndikutsatira malamulo akulozera, osalakwitsa m'mazina a mayikidwe ndikuganizira mayina amilandu yazosankha.